From 149df629d9bf9a105d67039df9f4ed9e6d70fde2 Mon Sep 17 00:00:00 2001 From: 964293341 Date: Sat, 16 Mar 2024 22:11:00 +0800 Subject: [PATCH 1/3] fix: rectify PyAPI according to CppAPI --- CAPI/python/PyAPI/AI.py | 9 +++- CAPI/python/PyAPI/API.py | 7 ++- CAPI/python/PyAPI/Communication.py | 6 +-- CAPI/python/PyAPI/Interface.py | 6 +-- CAPI/python/PyAPI/logic.py | 16 +++---- CAPI/python/PyAPI/main.py | 47 ++++++++++++--------- CAPI/python/PyAPI/utils.py | 4 +- logic/Server/Properties/launchSettings.json | 2 +- 8 files changed, 54 insertions(+), 43 deletions(-) diff --git a/CAPI/python/PyAPI/AI.py b/CAPI/python/PyAPI/AI.py index 46e17fca..e3a24482 100644 --- a/CAPI/python/PyAPI/AI.py +++ b/CAPI/python/PyAPI/AI.py @@ -10,8 +10,15 @@ class Setting: # 为假则play()期间确保游戏状态不更新,为真则只保证游戏状态在调用相关方法时不更新,大致一帧更新一次 @staticmethod - def asynchronous() -> bool: + def Asynchronous() -> bool: return False + + @staticmethod + def ShipTypes()->List[THUAI7.ShipType]: + return [THUAI7.ShipType.CivilianShip, + THUAI7.ShipType.MilitaryShip, + THUAI7.ShipType.MilitaryShip, + THUAI7.ShipType.FlagShip] numOfGridPerCell: Final[int] = 1000 diff --git a/CAPI/python/PyAPI/API.py b/CAPI/python/PyAPI/API.py index 9c243cad..79172511 100644 --- a/CAPI/python/PyAPI/API.py +++ b/CAPI/python/PyAPI/API.py @@ -82,8 +82,8 @@ def GetConstructionHp(self, cellX: int, cellY: int) -> int: def GetWormHp(self, cellX: int, cellY: int) -> int: return self.__logic.GetWormHp(cellX, cellY) - def GetResouceState(self, cellX: int, cellY: int) -> int: - return self.__logic.GetResouceState(cellX, cellY) + def GetResourceState(self, cellX: int, cellY: int) -> int: + return self.__logic.GetResourceState(cellX, cellY) def GetHomeHp(self) -> int: return self.__logic.GetHomeHp() @@ -114,6 +114,9 @@ def Print(self, cont: str) -> None: def PrintShip(self) -> None: pass + def PrintTeam(self) -> None: + pass + def PrintSelfInfo(self) -> None: pass diff --git a/CAPI/python/PyAPI/Communication.py b/CAPI/python/PyAPI/Communication.py index 98076bb9..b8300ede 100644 --- a/CAPI/python/PyAPI/Communication.py +++ b/CAPI/python/PyAPI/Communication.py @@ -220,11 +220,11 @@ def GetMessage2Client(self) -> Message2Clients.MessageToClient: self.__haveNewMessage = False return self.__message2Client - def AddPlayer(self, playerID: int, teamID: int, cellX: int, cellY: int, shipType: THUAI7.ShipType) -> None: + def AddPlayer(self, playerID: int, teamID: int, shipType: THUAI7.ShipType) -> None: def tMessage(): try: if playerID == 0: - playerMsg = THUAI72Proto.THUAI72ProtobufPlayerMsg(playerID, teamID, shipType, cellX, cellY) + playerMsg = THUAI72Proto.THUAI72ProtobufPlayerMsg(playerID, teamID, shipType) for msg in self.__THUAI7Stub.AddPlayer(playerMsg): with self.__cvMessage: self.__haveNewMessage = True @@ -234,7 +234,7 @@ def tMessage(): self.__counter = 0 self.__counterMove = 0 elif playerID >= 1 and playerID <= 8: - playerMsg = THUAI72Proto.THUAI72ProtobufPlayerMsg(playerID, teamID, shipType, cellX, cellY) + playerMsg = THUAI72Proto.THUAI72ProtobufPlayerMsg(playerID, teamID, shipType) for msg in self.__THUAI7Stub.AddPlayer(playerMsg): with self.__cvMessage: self.__haveNewMessage = True diff --git a/CAPI/python/PyAPI/Interface.py b/CAPI/python/PyAPI/Interface.py index bbafe3eb..a2240ba3 100644 --- a/CAPI/python/PyAPI/Interface.py +++ b/CAPI/python/PyAPI/Interface.py @@ -141,11 +141,7 @@ class IAPI(metaclass=ABCMeta): ''' @abstractmethod - def SendTextMessage(self, toPlayerID: int, message: str) -> Future[bool]: - pass - - @abstractmethod - def SendBinaryMessage(self, toPlayerID: int, message: str) -> Future[bool]: + def SendMessage(self, toPlayerID: int, message: Union[str, bytes]) -> Future[bool]: pass @abstractmethod diff --git a/CAPI/python/PyAPI/logic.py b/CAPI/python/PyAPI/logic.py index 9f02a325..759ed04b 100644 --- a/CAPI/python/PyAPI/logic.py +++ b/CAPI/python/PyAPI/logic.py @@ -18,13 +18,11 @@ class Logic(ILogic): - # TODO: Mismatch between logic.py & main.py - def __init__(self, playerID: int, shipType: THUAI7.ShipType, teamID: int, x: int, y: int) -> None: + def __init__(self, playerID: int, teamID: int, playerType: THUAI7.PlayerType, shipType: THUAI7.ShipType) -> None: self.__playerID: int = playerID self.__teamID: int = teamID + self.__playerType: THUAI7.PlayerType = playerType self.__shipType: THUAI7.ShipType = shipType - self.__x: int = x - self.__y: int = y self.__comm: Communication @@ -231,7 +229,7 @@ def __TryConnection(self) -> bool: def __ProcessMessage(self) -> None: def messageThread(): self.__logger.info("Message thread started") - self.__comm.AddPlayer(self.__playerID, self.__teamID, self.__shipType, self.__x, self.__y) + self.__comm.AddPlayer(self.__playerID, self.__teamID, self.__shipType) self.__logger.info("Player added") while self.__gameState != THUAI7.GameState.GameEnd: @@ -301,7 +299,7 @@ def LoadBuffer(self, message: Message2Clients.MessageToClient) -> None: self.__LoadBufferSelf(message) for item in message.obj_message: self.__LoadBufferCase(item) - if Setting.asynchronous(): + if Setting.Asynchronous(): with self.__mtxState: self.__currentState, self.__bufferState = self.__bufferState, self.__currentState self.__counterState = self.__counterBuffer @@ -451,7 +449,7 @@ def __UnBlockAI(self) -> None: self.__cvAI.notify() def __Update(self) -> None: - if not Setting.asynchronous(): + if not Setting.Asynchronous(): with self.__cvBuffer: self.__cvBuffer.wait_for(lambda: self.__bufferUpdated) with self.__mtxState: @@ -512,7 +510,7 @@ def Main( self.__logger.addHandler(screenHandler) self.__logger.info("*********Basic Info*********") - self.__logger.info("asynchronous: %s", Setting.asynchronous()) + self.__logger.info("asynchronous: %s", Setting.Asynchronous()) self.__logger.info("server: %s:%s", IP, port) self.__logger.info("playerID: %s", self.__playerID) self.__logger.info("player type: %s", self.__playerType.name) @@ -536,7 +534,7 @@ def AIThread(): ai = createAI(self.__playerID) while self.__AILoop: - if Setting.asynchronous(): + if Setting.Asynchronous(): self.__Wait() self.__timer.StartTimer() self.__timer.Play(ai) diff --git a/CAPI/python/PyAPI/main.py b/CAPI/python/PyAPI/main.py index 1708e0d8..e6f7974e 100644 --- a/CAPI/python/PyAPI/main.py +++ b/CAPI/python/PyAPI/main.py @@ -9,27 +9,25 @@ import PyAPI.structures as THUAI7 # NOQA: E402 from PyAPI.logic import Logic # NOQA: E402 -from PyAPI.AI import AI # NOQA: E402 +from PyAPI.AI import AI, Setting # NOQA: E402 from PyAPI.Interface import IAI # NOQA: E402 def PrintWelcomeString() -> None: # Generated by http://www.network-science.de/ascii/ with font "standard" welcomeString = r''' - - _____ _ _ _ _ _ ___ _____ - |_ _| | | | | | | / \ |_ _|___ | - | | | |_| | | | |/ _ \ | | / / - | | | _ | |_| / ___ \ | | / / - |_| |_| |_|\___/_/ \_\___|/_/ - - ____ _ _ ____ _ _ _ - / ___|_ __ __ _ __| |_ _ __ _| |_ ___ / ___(_)_ __| |___| | - | | _| '__/ _` |/ _` | | | |/ _` | __/ _ \ | | _| | '__| / __| | - | |_| | | | (_| | (_| | |_| | (_| | || __/_ | |_| | | | | \__ \_| - \____|_| \__,_|\__,_|\__,_|\__,_|\__\___( ) \____|_|_| |_|___(_) - - + ______________ ___ ____ ___ _____ .____________ + \__ ___/ | \| | \/ _ \ | \______ \ + | | / ~ \ | / /_\ \| | / / + | | \ Y / | / | \ | / / + |____| \___|_ /|______/\____|__ /___| /____/ + \/ \/ + _________ __ __ __ + / _____// |______ _______ / \ / \_____ _______ + \_____ \\ __\__ \\_ __ \ \ \/\/ /\__ \\_ __ \ + / \| | / __ \| | \/ \ / / __ \| | \/ + /_______ /|__| (____ /__| \__/\ / (____ /__| + \/ \/ \/ \/ ''' print(welcomeString) @@ -60,6 +58,14 @@ def THUAI7Main(argv: List[str], AIBuilder: Callable) -> None: dest="sPort", default="8888", ) + parser.add_argument( + "-t", + type=int, + required=True, + help="Team`s ID", + dest="tID", + choices=[0, 1], + ) parser.add_argument( "-p", type=int, @@ -87,6 +93,7 @@ def THUAI7Main(argv: List[str], AIBuilder: Callable) -> None: dest="warnOnly", ) args = parser.parse_args() + tID = args.tID pID = args.pID sIP = args.sIP sPort = args.sPort @@ -94,15 +101,17 @@ def THUAI7Main(argv: List[str], AIBuilder: Callable) -> None: screen = args.screen warnOnly = args.warnOnly playerType = THUAI7.PlayerType.NullPlayerType - if pID == 4: - playerType = THUAI7.PlayerType.Ship - else: + shipType = THUAI7.ShipType.NullShipType + if pID == 0: playerType = THUAI7.PlayerType.Team + else: + playerType = THUAI7.PlayerType.Ship + shipType = Setting.ShipTypes()[pID] if platform.system().lower() == "windows": PrintWelcomeString() - logic = Logic(pID, playerType) + logic = Logic(pID, tID, playerType, shipType) logic.Main(AIBuilder, sIP, sPort, file, screen, warnOnly) diff --git a/CAPI/python/PyAPI/utils.py b/CAPI/python/PyAPI/utils.py index e7a9c917..832213e7 100644 --- a/CAPI/python/PyAPI/utils.py +++ b/CAPI/python/PyAPI/utils.py @@ -492,13 +492,11 @@ def THUAI72ProtobufBuildShipMsg( @staticmethod def THUAI72ProtobufPlayerMsg( - playerID: int, teamID: int, shipType: THUAI7.ShipType, x: int, y: int + playerID: int, teamID: int, shipType: THUAI7.ShipType ) -> Message2Server.PlayerMsg: return Message2Server.PlayerMsg( player_id=playerID, team_id=teamID, - x=x, - y=y, ship_type=THUAI72Proto.shipTypeDict[shipType] ) diff --git a/logic/Server/Properties/launchSettings.json b/logic/Server/Properties/launchSettings.json index 3259ad2e..1b43580c 100755 --- a/logic/Server/Properties/launchSettings.json +++ b/logic/Server/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Server": { "commandName": "Project", - "commandLineArgs": "--port 8888 --teamCount 1 --homeNum 0 --MaxShipNum 1" + "commandLineArgs": "--port 8888 --teamCount 1 --homeNum 1 --MaxShipNum 2" } } } \ No newline at end of file From 70222a788d776b5791a0eba473d88b73e9c50152 Mon Sep 17 00:00:00 2001 From: 964293341 Date: Sun, 17 Mar 2024 21:13:44 +0800 Subject: [PATCH 2/3] fix(PyAPI): fix mismatch between PyAPI and Protobuf --- CAPI/python/PyAPI/AI.py | 10 +- CAPI/python/PyAPI/API.py | 12 +- CAPI/python/PyAPI/Communication.py | 6 +- CAPI/python/PyAPI/Interface.py | 18 +-- CAPI/python/PyAPI/State.py | 12 +- CAPI/python/PyAPI/constants.py | 18 +-- CAPI/python/PyAPI/logic.py | 22 ++-- CAPI/python/PyAPI/main.py | 6 +- CAPI/python/PyAPI/structures.py | 66 +++++------ CAPI/python/PyAPI/utils.py | 178 ++++++++++++++--------------- 10 files changed, 174 insertions(+), 174 deletions(-) diff --git a/CAPI/python/PyAPI/AI.py b/CAPI/python/PyAPI/AI.py index e3a24482..ba94ee8c 100644 --- a/CAPI/python/PyAPI/AI.py +++ b/CAPI/python/PyAPI/AI.py @@ -14,11 +14,11 @@ def Asynchronous() -> bool: return False @staticmethod - def ShipTypes()->List[THUAI7.ShipType]: - return [THUAI7.ShipType.CivilianShip, - THUAI7.ShipType.MilitaryShip, - THUAI7.ShipType.MilitaryShip, - THUAI7.ShipType.FlagShip] + def SweeperTypes()->List[THUAI7.SweeperType]: + return [THUAI7.SweeperType.CivilianSweeper, + THUAI7.SweeperType.MilitarySweeper, + THUAI7.SweeperType.MilitarySweeper, + THUAI7.SweeperType.FlagSweeper] numOfGridPerCell: Final[int] = 1000 diff --git a/CAPI/python/PyAPI/API.py b/CAPI/python/PyAPI/API.py index 79172511..d5a9528b 100644 --- a/CAPI/python/PyAPI/API.py +++ b/CAPI/python/PyAPI/API.py @@ -61,10 +61,10 @@ def HaveMessage(self) -> bool: def GetMessage(self) -> Tuple[int, Union[str, bytes]]: return self.__logic.GetMessage() - def GetShips(self) -> List[THUAI7.Ship]: + def GetShips(self) -> List[THUAI7.Sweeper]: return self.__logic.GetShips() - def GetEnemyShips(self) -> List[THUAI7.Ship]: + def GetEnemyShips(self) -> List[THUAI7.Sweeper]: return self.__logic.GetEnemyShips() def GetBullets(self) -> List[THUAI7.Bullet]: @@ -94,7 +94,7 @@ def GetGameInfo(self) -> THUAI7.GameInfo: def GetPlayerGUIDs(self) -> List[int]: return self.__logic.GetPlayerGUIDs() - def GetSelfInfo(self) -> THUAI7.Ship: + def GetSelfInfo(self) -> THUAI7.Sweeper: return cast(THUAI7.Ships, self.__logic.GetSelfInfo()) def GetMoney(self) -> int: @@ -168,10 +168,10 @@ def EndAllAction(self) -> Future[bool]: def GetBullets(self) -> List[THUAI7.Bullet]: return self.__logic.GetBullets() - def GetShips(self) -> List[THUAI7.Ship]: + def GetShips(self) -> List[THUAI7.Sweeper]: return self.__logic.GetShips() - def GetEnemyShips(self) -> List[THUAI7.Ship]: + def GetEnemyShips(self) -> List[THUAI7.Sweeper]: return self.__logic.GetEnemyShips() def GetFullMap(self) -> List[List[THUAI7.PlaceType]]: @@ -213,7 +213,7 @@ def InstallModule(self, ID: int, type: THUAI7.ModuleType) -> Future[bool]: def Recycle(self, ID: int) -> Future[bool]: return self.__pool.submit(self.__logic.Recycle, ID) - def BuildShip(self, shipType: THUAI7.ShipType, cellX: int, cellY: int) -> Future[bool]: + def BuildShip(self, shipType: THUAI7.SweeperType, cellX: int, cellY: int) -> Future[bool]: return self.__pool.submit(self.__logic.BuildShip, shipType, cellX, cellY) def Print(self, string: str) -> None: diff --git a/CAPI/python/PyAPI/Communication.py b/CAPI/python/PyAPI/Communication.py index b8300ede..5990742a 100644 --- a/CAPI/python/PyAPI/Communication.py +++ b/CAPI/python/PyAPI/Communication.py @@ -190,14 +190,14 @@ def Recycle(self, playerID: int, teamID: int) -> bool: else: return recycleResult.act_success - def BuildShip(self, cellX: int, cellY: int, shipType: THUAI7.ShipType, teamID: int) -> bool: + def BuildShip(self, cellX: int, cellY: int, shipType: THUAI7.SweeperType, teamID: int) -> bool: try: with self.__mtxLimit: if self.__counter >= self.__limit: return False self.__counter += 1 buildResult: Message2Clients.BoolRes = self.__THUAI7Stub.BuildShip( - THUAI72Proto.THUAI72ProtobufBuildShipMsg(teamID, shipType, cellX, cellY) + THUAI72Proto.THUAI72ProtobufBuildSweeperMsg(teamID, shipType, cellX, cellY) ) except grpc.RpcError: return False @@ -220,7 +220,7 @@ def GetMessage2Client(self) -> Message2Clients.MessageToClient: self.__haveNewMessage = False return self.__message2Client - def AddPlayer(self, playerID: int, teamID: int, shipType: THUAI7.ShipType) -> None: + def AddPlayer(self, playerID: int, teamID: int, shipType: THUAI7.SweeperType) -> None: def tMessage(): try: if playerID == 0: diff --git a/CAPI/python/PyAPI/Interface.py b/CAPI/python/PyAPI/Interface.py index a2240ba3..b6b0fe23 100644 --- a/CAPI/python/PyAPI/Interface.py +++ b/CAPI/python/PyAPI/Interface.py @@ -11,11 +11,11 @@ class ILogic(metaclass=ABCMeta): '''`IAPI` 统一可用的接口''' @abstractmethod - def GetShips(self) -> List[THUAI7.Ship]: + def GetShips(self) -> List[THUAI7.Sweeper]: pass @abstractmethod - def GetEnemyShips(self) -> List[THUAI7.Ship]: + def GetEnemyShips(self) -> List[THUAI7.Sweeper]: pass @abstractmethod @@ -23,7 +23,7 @@ def GetBullets(self) -> List[THUAI7.Bullet]: pass @abstractmethod - def GetSelfInfo(self) -> Union[THUAI7.Ship, THUAI7.Team]: + def GetSelfInfo(self) -> Union[THUAI7.Sweeper, THUAI7.Team]: pass @abstractmethod @@ -127,7 +127,7 @@ def InstallModule(self, playerID: int, moduleType: THUAI7.ModuleType) -> bool: pass @abstractmethod - def BuildShip(self, shipType: THUAI7.ShipType, cellX: int, cellY: int) -> bool: + def BuildShip(self, shipType: THUAI7.SweeperType, cellX: int, cellY: int) -> bool: pass @@ -172,11 +172,11 @@ def EndAllAction(self) -> Future[bool]: pass @abstractmethod - def GetShips(self) -> List[THUAI7.Ship]: + def GetShips(self) -> List[THUAI7.Sweeper]: pass @abstractmethod - def GetEnemyShips(self) -> List[THUAI7.Ship]: + def GetEnemyShips(self) -> List[THUAI7.Sweeper]: pass @abstractmethod @@ -240,7 +240,7 @@ def PrintSelfInfo(self) -> None: pass @abstractmethod - def GetSelfInfo(self) -> Union[THUAI7.Ship, THUAI7.Team]: + def GetSelfInfo(self) -> Union[THUAI7.Sweeper, THUAI7.Team]: pass @@ -286,7 +286,7 @@ def Construct(self, constructionType: THUAI7.ConstructionType) -> Future[bool]: pass @abstractmethod - def GetSelfInfo(self) -> THUAI7.Ship: + def GetSelfInfo(self) -> THUAI7.Sweeper: pass @abstractmethod @@ -308,7 +308,7 @@ def Recycle(self, playerID: int) -> Future[bool]: pass @abstractmethod - def BuildShip(self, shipType: THUAI7.ShipType, cellX: int, cellY: int) -> Future[bool]: + def BuildShip(self, shipType: THUAI7.SweeperType, cellX: int, cellY: int) -> Future[bool]: pass diff --git a/CAPI/python/PyAPI/State.py b/CAPI/python/PyAPI/State.py index f688695e..d032a174 100644 --- a/CAPI/python/PyAPI/State.py +++ b/CAPI/python/PyAPI/State.py @@ -3,11 +3,11 @@ class State: - def __init__(self, **kwargs) -> None: + def __init__(self) -> None: self.teamScore = 0 - self.self = THUAI7.Ship() + self.self = THUAI7.Sweeper() self.ships = [] - self.enemyShips = [] + self.enemySweepers = [] self.teams = [] self.gameMap = [] self.bullets = [] @@ -17,10 +17,10 @@ def __init__(self, **kwargs) -> None: self.guids = [] teamScore: int - self: Union[THUAI7.Ship, THUAI7.Team] + self: Union[THUAI7.Sweeper, THUAI7.Team] - ships: List[THUAI7.Ship] - enemyShips: List[THUAI7.Ship] + ships: List[THUAI7.Sweeper] + enemySweepers: List[THUAI7.Sweeper] teams: List[THUAI7.Team] diff --git a/CAPI/python/PyAPI/constants.py b/CAPI/python/PyAPI/constants.py index c69c86bc..de719a60 100644 --- a/CAPI/python/PyAPI/constants.py +++ b/CAPI/python/PyAPI/constants.py @@ -3,14 +3,14 @@ class Constants: numofGridPerCell = 1000 rows = 50 cols = 50 - maxResourceProgress = 200 - maxWormholeHp = 18000 + maxGarbageProgress = 200 + maxBridgeHp = 18000 robPercent = 0.2 destroyBuildingBonus = 200 recoverMultiplier = 1.2 recycleMultiplier = 0.5 - sizeOfShip = 800 + sizeOfSweeper = 800 class Home: @@ -18,22 +18,22 @@ class Home: energySpeed = 1 -class Factory: +class RecycleBank: maxHp = 8000 energySpeed = 3 -class Community: +class ChargeStation: maxHp = 6000 -class Fort: +class SignalTower: maxHp = 12000 attackRange = 8000 damage = 1200 -class CivilianShip: +class CivilianSweeper: Speed = 3000 basicArmor = 0 basicShield = 0 @@ -41,7 +41,7 @@ class CivilianShip: Cost = 40 -class MilitaryShip: +class MilitarySweeper: Speed = 2800 basicArmor = 400 basicShield = 400 @@ -49,7 +49,7 @@ class MilitaryShip: Cost = 120 -class FlagShip: +class FlagSweeper: Speed = 2700 basicArmor = 800 basicShield = 800 diff --git a/CAPI/python/PyAPI/logic.py b/CAPI/python/PyAPI/logic.py index 759ed04b..b0a1aca9 100644 --- a/CAPI/python/PyAPI/logic.py +++ b/CAPI/python/PyAPI/logic.py @@ -18,11 +18,11 @@ class Logic(ILogic): - def __init__(self, playerID: int, teamID: int, playerType: THUAI7.PlayerType, shipType: THUAI7.ShipType) -> None: + def __init__(self, playerID: int, teamID: int, playerType: THUAI7.PlayerType, shipType: THUAI7.SweeperType) -> None: self.__playerID: int = playerID self.__teamID: int = teamID self.__playerType: THUAI7.PlayerType = playerType - self.__shipType: THUAI7.ShipType = shipType + self.__shipType: THUAI7.SweeperType = shipType self.__comm: Communication @@ -55,22 +55,22 @@ def __init__(self, playerID: int, teamID: int, playerType: THUAI7.PlayerType, sh self.__messageQueue: Queue = Queue() - def GetShips(self) -> List[THUAI7.Ship]: + def GetShips(self) -> List[THUAI7.Sweeper]: with self.__mtxState: self.__logger.debug("Called GetShips") return copy.deepcopy(self.__currentState.ships) - def GetEnemyShips(self) -> List[THUAI7.Ship]: + def GetEnemyShips(self) -> List[THUAI7.Sweeper]: with self.__mtxState: self.__logger.debug("Called GetEnemyShips") - return copy.deepcopy(self.__currentState.enemyShips) + return copy.deepcopy(self.__currentState.enemySweepers) def GetBullets(self) -> List[THUAI7.Bullet]: with self.__mtxState: self.__logger.debug("Called GetBullets") return copy.deepcopy(self.__currentState.bullets) - def GetSelfInfo(self) -> Union[THUAI7.Ship, THUAI7.Team]: + def GetSelfInfo(self) -> Union[THUAI7.Sweeper, THUAI7.Team]: with self.__mtxState: self.__logger.debug("Called GetSelfInfo") return copy.deepcopy(self.__currentState.self) @@ -218,7 +218,7 @@ def Recycle(self) -> bool: self.__logger.debug("Called Recycle") return self.__comm.Recycle(self.__playerID, self.__playerID, self.__teamID) - def BuildShip(self, shipType: THUAI7.ShipType, cellX: int, cellY: int) -> bool: + def BuildShip(self, shipType: THUAI7.SweeperType, cellX: int, cellY: int) -> bool: self.__logger.debug("Called BuildShip") return self.__comm.BuildShip(cellX, cellY, shipType, self.__teamID) @@ -278,7 +278,7 @@ def messageThread(): def LoadBuffer(self, message: Message2Clients.MessageToClient) -> None: with self.__cvBuffer: self.__bufferState.ships.clear() - self.__bufferState.enemyShips.clear() + self.__bufferState.enemySweepers.clear() self.__bufferState.teams.clear() self.__bufferState.bullets.clear() self.__bufferState.bombedBullets.clear() @@ -315,10 +315,10 @@ def __LoadBufferSelf(self, message: Message2Clients.MessageToClient) -> None: for item in message.obj_message: if item.WhichOneof("message_of_obj") == "ship_message": if item.ship_message.player_id == self.__playerID: - self.__bufferState.self = Proto2THUAI7.Protobuf2THUAI7Ship(item.ship_message) + self.__bufferState.self = Proto2THUAI7.Protobuf2THUAI7Sweeper(item.ship_message) self.__bufferState.ships.append(self.__bufferState.self) else: - self.__bufferState.ships.append(Proto2THUAI7.Protobuf2THUAI7Ship(item.ship_message)) + self.__bufferState.ships.append(Proto2THUAI7.Protobuf2THUAI7Sweeper(item.ship_message)) self.__logger.debug("Load ship") else: for item in message.obj_message: @@ -334,7 +334,7 @@ def __LoadBufferCase(self, item: Message2Clients.MessageOfObj) -> None: self.__bufferState.self.x, self.__bufferState.self.y, item.ship_message.x, item.ship_message.y, self.__bufferState.gameMap): - self.__bufferState.enemyShips.append(Proto2THUAI7.Protobuf2THUAI7Ship(item.ship_message)) + self.__bufferState.enemySweepers.append(Proto2THUAI7.Protobuf2THUAI7Sweeper(item.ship_message)) self.__logger.debug("Load enemy ship") elif item.WhichOneof("message_of_obj") == "bullet_message": diff --git a/CAPI/python/PyAPI/main.py b/CAPI/python/PyAPI/main.py index e6f7974e..4acb8392 100644 --- a/CAPI/python/PyAPI/main.py +++ b/CAPI/python/PyAPI/main.py @@ -101,12 +101,12 @@ def THUAI7Main(argv: List[str], AIBuilder: Callable) -> None: screen = args.screen warnOnly = args.warnOnly playerType = THUAI7.PlayerType.NullPlayerType - shipType = THUAI7.ShipType.NullShipType + shipType = THUAI7.SweeperType.NullSweeperType if pID == 0: playerType = THUAI7.PlayerType.Team else: - playerType = THUAI7.PlayerType.Ship - shipType = Setting.ShipTypes()[pID] + playerType = THUAI7.PlayerType.Sweeper + shipType = Setting.SweeperTypes()[pID] if platform.system().lower() == "windows": PrintWelcomeString() diff --git a/CAPI/python/PyAPI/structures.py b/CAPI/python/PyAPI/structures.py index 56708c92..8ee68721 100644 --- a/CAPI/python/PyAPI/structures.py +++ b/CAPI/python/PyAPI/structures.py @@ -18,13 +18,13 @@ class GameState(Enum): class PlaceType(Enum): NullPlaceType = 0 Home = 1 - Space = 2 - Ruin = 3 - Shadow = 4 - Asteroid = 5 - Resource = 6 + Ground = 2 + Wall = 3 + Grass = 4 + River = 5 + Garbage = 6 Construction = 7 - Wormhole = 8 + Bridge = 8 class ShapeType(Enum): @@ -48,15 +48,15 @@ class PlayerTeam(Enum): class PlayerType(Enum): NullPlayerType = 0 - Ship = 1 + Sweeper = 1 Team = 2 -class ShipType(Enum): - NullShipType = 0 - CivilianShip = 1 - MilitaryShip = 2 - FlagShip = 3 +class SweeperType(Enum): + NullSweeperType = 0 + CivilianSweeper = 1 + MilitarySweeper = 2 + FlagSweeper = 3 class WeaponType(Enum): @@ -117,7 +117,7 @@ class ModuleType(Enum): ModuleArcGun = 17 -class ShipState(Enum): +class SweeperState(Enum): NullStatus = 0 Idle = 1 Producing = 2 @@ -141,21 +141,21 @@ class BulletType(Enum): class ConstructionType(Enum): NullConstructionType = 0 - Factory = 1 - Community = 2 - Fort = 3 + RecycleBank = 1 + ChargeStation = 2 + SignalTower = 3 class MessageOfObj(Enum): NullMessageOfObj = 0 - ShipMessage = 1 + SweeperMessage = 1 BulletMessage = 2 - FactoryMessage = 3 - CommunityMessage = 4 - FortMessage = 5 - WormholeMessage = 6 + RecycleBankMessage = 3 + ChargeStationMessage = 4 + SignalTowerMessage = 5 + BridgeMessage = 6 HomeMessage = 7 - ResourceMessage = 8 + GarbageMessage = 8 MapMessage = 9 NewsMessage = 10 BombedBulletMessage = 11 @@ -168,7 +168,7 @@ class NewsType(Enum): BinaryMessage = 2 -class Ship: +class Sweeper: def __init__(self): self.x: int = 0 self.y: int = 0 @@ -179,8 +179,8 @@ def __init__(self): self.playerID: int = 0 self.teamID: int = 0 self.guid: int = 0 - self.shipState: ShipState = ShipState.NullStatus - self.shipType: ShipType = ShipType.NullShipType + self.sweeperState: SweeperState = SweeperState.NullStatus + self.sweeperType: SweeperType = SweeperType.NullSweeperType self.viewRange: int = 0 self.producerType: ProducerType = ProducerType.NullProducerType self.constructorType: ConstructorType = ConstructorType.NullConstructorType @@ -195,7 +195,7 @@ def __init__(self): self.playerID: int = 0 self.teamID: int = 0 self.score: int = 0 - self.money: int = 0 + self.energy: int = 0 class Home: @@ -224,20 +224,20 @@ def __init__(self): class GameMap: def __init__(self): - self.factoryState: Dict[Tuple[int, int], Tuple[int, int]] = {} - self.communityState: Dict[Tuple[int, int], Tuple[int, int]] = {} - self.fortState: Dict[Tuple[int, int], Tuple[int, int]] = {} + self.recycleBankState: Dict[Tuple[int, int], Tuple[int, int]] = {} + self.chargeStationState: Dict[Tuple[int, int], Tuple[int, int]] = {} + self.signalTowerState: Dict[Tuple[int, int], Tuple[int, int]] = {} self.HomeState: Dict[Tuple[int, int], Tuple[int, int]] = {} - self.wormholeState: Dict[Tuple[int, int], int] = {} - self.resourceState: Dict[Tuple[int, int], int] = {} + self.bridgeState: Dict[Tuple[int, int], int] = {} + self.garbageState: Dict[Tuple[int, int], int] = {} class GameInfo: def __init__(self): self.gameTime: int = 0 self.redScore: int = 0 - self.redMoney: int = 0 + self.redEnergy: int = 0 self.redHomeHp: int = 0 self.blueScore: int = 0 - self.blueMoney: int = 0 + self.blueEnergy: int = 0 self.blueHomeHp: int = 0 diff --git a/CAPI/python/PyAPI/utils.py b/CAPI/python/PyAPI/utils.py index 832213e7..d63d2d4b 100644 --- a/CAPI/python/PyAPI/utils.py +++ b/CAPI/python/PyAPI/utils.py @@ -30,7 +30,7 @@ def HaveView( distance = deltaX**2 + deltaY**2 myPlace = map[AssistFunction.GridToCell(x)][AssistFunction.GridToCell(y)] newPlace = map[AssistFunction.GridToCell(newX)][AssistFunction.GridToCell(newY)] - if myPlace != THUAI7.PlaceType.Shadow and newPlace == THUAI7.PlaceType.Shadow: + if myPlace != THUAI7.PlaceType.Grass and newPlace == THUAI7.PlaceType.Grass: return False if distance <= viewRange * viewRange: divide = max(abs(deltaX), abs(deltaY)) // 100 @@ -40,12 +40,12 @@ def HaveView( dy = deltaY / divide selfX = float(x) selfY = float(y) - if (newPlace == THUAI7.PlaceType.Shadow and myPlace == THUAI7.PlaceType.Shadow): + if (newPlace == THUAI7.PlaceType.Grass and myPlace == THUAI7.PlaceType.Grass): for _ in range(divide): selfX += dx selfY += dy if (map[AssistFunction.GridToCell(int(selfX))][AssistFunction.GridToCell(int(selfY))] - != THUAI7.PlaceType.Shadow): + != THUAI7.PlaceType.Grass): return False else: return True @@ -54,7 +54,7 @@ def HaveView( selfX += dx selfY += dy if (map[AssistFunction.GridToCell(int(selfX))][AssistFunction.GridToCell(int(selfY))] - == THUAI7.PlaceType.Ruin): + == THUAI7.PlaceType.Wall): return False else: return True @@ -73,13 +73,13 @@ class Proto2THUAI7: placeTypeDict: Final[dict] = { MessageType.NULL_PLACE_TYPE: THUAI7.PlaceType.NullPlaceType, MessageType.HOME: THUAI7.PlaceType.Home, - MessageType.SPACE: THUAI7.PlaceType.Space, - MessageType.RUIN: THUAI7.PlaceType.Ruin, - MessageType.SHADOW: THUAI7.PlaceType.Shadow, - MessageType.ASTEROID: THUAI7.PlaceType.Asteroid, - MessageType.RESOURCE: THUAI7.PlaceType.Resource, + MessageType.GROUND: THUAI7.PlaceType.Ground, + MessageType.WALL: THUAI7.PlaceType.Wall, + MessageType.GRASS: THUAI7.PlaceType.Grass, + MessageType.RIVER: THUAI7.PlaceType.River, + MessageType.GARBAGE: THUAI7.PlaceType.Garbage, MessageType.CONSTRUCTION: THUAI7.PlaceType.Construction, - MessageType.WORMHOLE: THUAI7.PlaceType.Wormhole, + MessageType.BRIDGE: THUAI7.PlaceType.Bridge, } shapeTypeDict: Final[dict] = { @@ -90,28 +90,28 @@ class Proto2THUAI7: playerTypeDict: Final[dict] = { MessageType.NULL_PLAYER_TYPE: THUAI7.PlayerType.NullPlayerType, - MessageType.SHIP: THUAI7.PlayerType.Ship, + MessageType.SWEEPER: THUAI7.PlayerType.Sweeper, MessageType.TEAM: THUAI7.PlayerType.Team, } - shipTypeDict: Final[dict] = { - MessageType.NULL_SHIP_TYPE: THUAI7.ShipType.NullShipType, - MessageType.CIVILIAN_SHIP: THUAI7.ShipType.CivilianShip, - MessageType.MILITARY_SHIP: THUAI7.ShipType.MilitaryShip, - MessageType.FLAG_SHIP: THUAI7.ShipType.FlagShip, + sweeperTypeDict: Final[dict] = { + MessageType.NULL_SWEEPER_TYPE: THUAI7.SweeperType.NullSweeperType, + MessageType.CIVILIAN_SWEEPER: THUAI7.SweeperType.CivilianSweeper, + MessageType.MILITARY_SWEEPER: THUAI7.SweeperType.MilitarySweeper, + MessageType.FLAG_SWEEPER: THUAI7.SweeperType.FlagSweeper, } - shipStateDict: Final[dict] = { - MessageType.NULL_STATUS: THUAI7.ShipState.NullStatus, - MessageType.IDLE: THUAI7.ShipState.Idle, - MessageType.PRODUCING: THUAI7.ShipState.Producing, - MessageType.CONSTRUCTING: THUAI7.ShipState.Constructing, - MessageType.RECOVERING: THUAI7.ShipState.Recovering, - MessageType.RECYCLING: THUAI7.ShipState.Recycling, - MessageType.ATTACKING: THUAI7.ShipState.Attacking, - MessageType.SWINGING: THUAI7.ShipState.Swinging, - MessageType.STUNNED: THUAI7.ShipState.Stunned, - MessageType.MOVING: THUAI7.ShipState.Moving, + sweeperStateDict: Final[dict] = { + MessageType.NULL_STATUS: THUAI7.SweeperState.NullStatus, + MessageType.IDLE: THUAI7.SweeperState.Idle, + MessageType.PRODUCING: THUAI7.SweeperState.Producing, + MessageType.CONSTRUCTING: THUAI7.SweeperState.Constructing, + MessageType.RECOVERING: THUAI7.SweeperState.Recovering, + MessageType.RECYCLING: THUAI7.SweeperState.Recycling, + MessageType.ATTACKING: THUAI7.SweeperState.Attacking, + MessageType.SWINGING: THUAI7.SweeperState.Swinging, + MessageType.STUNNED: THUAI7.SweeperState.Stunned, + MessageType.MOVING: THUAI7.SweeperState.Moving, } weaponTypeDict: Final[dict] = { @@ -183,9 +183,9 @@ class Proto2THUAI7: constructionTypeDict: Final[dict] = { MessageType.NULL_CONSTRUCTION_TYPE: THUAI7.ConstructionType.NullConstructionType, - MessageType.FACTORY: THUAI7.ConstructionType.Factory, - MessageType.COMMUNITY: THUAI7.ConstructionType.Community, - MessageType.FORT: THUAI7.ConstructionType.Fort, + MessageType.RECYCLEBANK: THUAI7.ConstructionType.RecycleBank, + MessageType.CHARGESTATION: THUAI7.ConstructionType.ChargeStation, + MessageType.SIGNALTOWER: THUAI7.ConstructionType.SignalTower, } playerTeamDict: Final[dict] = { @@ -195,35 +195,35 @@ class Proto2THUAI7: } newsTypeDict: Final[dict] = { - MessageType.NewsType.NULL_NEWS_TYPE: THUAI7.NewsType.NullNewsType, - MessageType.NewsType.TEXT: THUAI7.NewsType.TextMessage, - MessageType.NewsType.BINARY: THUAI7.NewsType.BinaryMessage, + MessageType.NULL_NEWS_TYPE: THUAI7.NewsType.NullNewsType, + MessageType.TEXT: THUAI7.NewsType.TextMessage, + MessageType.BINARY: THUAI7.NewsType.BinaryMessage, } @staticmethod - def Protobuf2THUAI7Ship(shipMsg: Message2Clients.MessageOfShip) -> THUAI7.Ship: - ship = THUAI7.Ship() - ship.x = shipMsg.x - ship.y = shipMsg.y - ship.speed = shipMsg.speed - ship.hp = shipMsg.hp - ship.armor = shipMsg.armor - ship.shield = shipMsg.shield - ship.teamID = shipMsg.team_id - ship.playerID = shipMsg.player_id - ship.guid = shipMsg.guid - ship.shipState = Proto2THUAI7.shipStateDict[shipMsg.ship_state] - ship.shipType = Proto2THUAI7.shipTypeDict[shipMsg.ship_type] - ship.viewRange = shipMsg.view_range - ship.producerType = Proto2THUAI7.producerTypeDict[shipMsg.producer_type] - ship.constructorType = Proto2THUAI7.constructorTypeDict[ - shipMsg.constructor_type + def Protobuf2THUAI7Sweeper(sweeperMsg: Message2Clients.MessageOfSweeper) -> THUAI7.Sweeper: + sweeper = THUAI7.Sweeper() + sweeper.x = sweeperMsg.x + sweeper.y = sweeperMsg.y + sweeper.speed = sweeperMsg.speed + sweeper.hp = sweeperMsg.hp + sweeper.armor = sweeperMsg.armor + sweeper.shield = sweeperMsg.shield + sweeper.teamID = sweeperMsg.team_id + sweeper.playerID = sweeperMsg.player_id + sweeper.guid = sweeperMsg.guid + sweeper.sweeperState = Proto2THUAI7.sweeperStateDict[sweeperMsg.sweeper_state] + sweeper.sweeperType = Proto2THUAI7.sweeperTypeDict[sweeperMsg.sweeper_type] + sweeper.viewRange = sweeperMsg.view_range + sweeper.producerType = Proto2THUAI7.producerTypeDict[sweeperMsg.producer_type] + sweeper.constructorType = Proto2THUAI7.constructorTypeDict[ + sweeperMsg.constructor_type ] - ship.armorType = Proto2THUAI7.armorTypeDict[shipMsg.armor_type] - ship.shieldType = Proto2THUAI7.shieldTypeDict[shipMsg.shield_type] - ship.weaponType = Proto2THUAI7.weaponTypeDict[shipMsg.weapon_type] - ship.facingDirection = shipMsg.facing_direction - return ship + sweeper.armorType = Proto2THUAI7.armorTypeDict[sweeperMsg.armor_type] + sweeper.shieldType = Proto2THUAI7.shieldTypeDict[sweeperMsg.shield_type] + sweeper.weaponType = Proto2THUAI7.weaponTypeDict[sweeperMsg.weapon_type] + sweeper.facingDirection = sweeperMsg.facing_direction + return sweeper @staticmethod def Protobuf2THUAI7Bullet( @@ -256,7 +256,7 @@ def Protobuf2THUAI7Team(teamMsg: Message2Clients.MessageOfTeam) -> THUAI7.Team: team.playerID = teamMsg.player_id team.teamID = teamMsg.team_id team.score = teamMsg.score - team.money = teamMsg.money + team.energy = teamMsg.energy return team @staticmethod @@ -281,13 +281,13 @@ class THUAI72Proto: placeTypeDict: Final[dict] = { THUAI7.PlaceType.NullPlaceType: MessageType.NULL_PLACE_TYPE, THUAI7.PlaceType.Home: MessageType.HOME, - THUAI7.PlaceType.Space: MessageType.SPACE, - THUAI7.PlaceType.Ruin: MessageType.RUIN, - THUAI7.PlaceType.Shadow: MessageType.SHADOW, - THUAI7.PlaceType.Asteroid: MessageType.ASTEROID, - THUAI7.PlaceType.Resource: MessageType.RESOURCE, + THUAI7.PlaceType.Ground: MessageType.GROUND, + THUAI7.PlaceType.Wall: MessageType.WALL, + THUAI7.PlaceType.Grass: MessageType.GRASS, + THUAI7.PlaceType.River: MessageType.RIVER, + THUAI7.PlaceType.Garbage: MessageType.GARBAGE, THUAI7.PlaceType.Construction: MessageType.CONSTRUCTION, - THUAI7.PlaceType.Wormhole: MessageType.WORMHOLE, + THUAI7.PlaceType.Bridge: MessageType.BRIDGE, } shapeTypeDict: Final[dict] = { @@ -298,28 +298,28 @@ class THUAI72Proto: playerTypeDict: Final[dict] = { THUAI7.PlayerType.NullPlayerType: MessageType.NULL_PLAYER_TYPE, - THUAI7.PlayerType.Ship: MessageType.SHIP, + THUAI7.PlayerType.Sweeper: MessageType.SWEEPER, THUAI7.PlayerType.Team: MessageType.TEAM, } - shipTypeDict: Final[dict] = { - THUAI7.ShipType.NullShipType: MessageType.NULL_SHIP_TYPE, - THUAI7.ShipType.CivilianShip: MessageType.CIVILIAN_SHIP, - THUAI7.ShipType.MilitaryShip: MessageType.MILITARY_SHIP, - THUAI7.ShipType.FlagShip: MessageType.FLAG_SHIP, + sweeperTypeDict: Final[dict] = { + THUAI7.SweeperType.NullSweeperType: MessageType.NULL_SWEEPER_TYPE, + THUAI7.SweeperType.CivilianSweeper: MessageType.CIVILIAN_SWEEPER, + THUAI7.SweeperType.MilitarySweeper: MessageType.MILITARY_SWEEPER, + THUAI7.SweeperType.FlagSweeper: MessageType.FLAG_SWEEPER, } - shipStateDict: Final[dict] = { - THUAI7.ShipState.NullStatus: MessageType.NULL_STATUS, - THUAI7.ShipState.Idle: MessageType.IDLE, - THUAI7.ShipState.Producing: MessageType.PRODUCING, - THUAI7.ShipState.Constructing: MessageType.CONSTRUCTING, - THUAI7.ShipState.Recovering: MessageType.RECOVERING, - THUAI7.ShipState.Recycling: MessageType.RECYCLING, - THUAI7.ShipState.Attacking: MessageType.ATTACKING, - THUAI7.ShipState.Swinging: MessageType.SWINGING, - THUAI7.ShipState.Stunned: MessageType.STUNNED, - THUAI7.ShipState.Moving: MessageType.MOVING, + sweeperStateDict: Final[dict] = { + THUAI7.SweeperState.NullStatus: MessageType.NULL_STATUS, + THUAI7.SweeperState.Idle: MessageType.IDLE, + THUAI7.SweeperState.Producing: MessageType.PRODUCING, + THUAI7.SweeperState.Constructing: MessageType.CONSTRUCTING, + THUAI7.SweeperState.Recovering: MessageType.RECOVERING, + THUAI7.SweeperState.Recycling: MessageType.RECYCLING, + THUAI7.SweeperState.Attacking: MessageType.ATTACKING, + THUAI7.SweeperState.Swinging: MessageType.SWINGING, + THUAI7.SweeperState.Stunned: MessageType.STUNNED, + THUAI7.SweeperState.Moving: MessageType.MOVING, } weaponTypeDict: Final[dict] = { @@ -391,9 +391,9 @@ class THUAI72Proto: constructionTypeDict: Final[dict] = { THUAI7.ConstructionType.NullConstructionType: MessageType.NULL_CONSTRUCTION_TYPE, - THUAI7.ConstructionType.Factory: MessageType.FACTORY, - THUAI7.ConstructionType.Community: MessageType.COMMUNITY, - THUAI7.ConstructionType.Fort: MessageType.FORT, + THUAI7.ConstructionType.RecycleBank: MessageType.RECYCLEBANK, + THUAI7.ConstructionType.ChargeStation: MessageType.CHARGESTATION, + THUAI7.ConstructionType.SignalTower: MessageType.SIGNALTOWER, } playerTeamDict: Final[dict] = { @@ -480,24 +480,24 @@ def THUAI72ProtobufInstallMsg( ) @staticmethod - def THUAI72ProtobufBuildShipMsg( - teamID: int, shipType: THUAI7.ShipType, x: int, y: int - ) -> Message2Server.BuildShipMsg: - return Message2Server.BuildShipMsg( + def THUAI72ProtobufBuildSweeperMsg( + teamID: int, sweeperType: THUAI7.SweeperType, x: int, y: int + ) -> Message2Server.BuildSweeperMsg: + return Message2Server.BuildSweeperMsg( team_id=teamID, x=x, y=y, - ship_type=THUAI72Proto.shipTypeDict[shipType] + sweeper_type=THUAI72Proto.sweeperTypeDict[sweeperType] ) @staticmethod def THUAI72ProtobufPlayerMsg( - playerID: int, teamID: int, shipType: THUAI7.ShipType + playerID: int, teamID: int, shipType: THUAI7.SweeperType ) -> Message2Server.PlayerMsg: return Message2Server.PlayerMsg( player_id=playerID, team_id=teamID, - ship_type=THUAI72Proto.shipTypeDict[shipType] + sweeper_type=THUAI72Proto.sweeperTypeDict[shipType] ) @staticmethod From 4acc9b1e3823442f91b0038340305c360b7143d8 Mon Sep 17 00:00:00 2001 From: hhzzff <2070620600@qq.com> Date: Tue, 19 Mar 2024 19:23:47 +0800 Subject: [PATCH 3/3] feat: :sparkles: Added features such as building ships, moving, and attacking for local mode. --- .../Assets/Materials/Ship.physicsMaterial2D | 11 + .../Materials/Ship.physicsMaterial2D.meta | 8 + .../Universal Render Pipeline Asset.asset | 52 +- .../Assets/Prefabs/Base.prefab | 128 ++- .../Assets/Prefabs/Selected.prefab | 2 +- .../Assets/Prefabs/afflict_civilship3.prefab | 112 +- .../Assets/Prefabs/asteroid1.prefab | 50 +- .../Assets/Prefabs/asteroid2.prefab | 4 +- .../Assets/Prefabs/asteroid3.prefab | 50 +- .../Assets/Prefabs/community.prefab | 6 +- .../Prefabs/disperse_militaryship3.prefab | 112 +- .../Assets/Prefabs/factory.prefab | 6 +- .../Prefabs/foreshadow_flagship3.prefab | 113 +- .../Assets/Prefabs/laser.prefab | 19 +- .../Assets/Prefabs/missile.prefab | 21 +- .../Assets/Prefabs/plasma.prefab | 21 +- .../Assets/Prefabs/resourceA1.prefab | 4 +- .../Assets/Prefabs/resourceB1.prefab | 4 +- .../Assets/Prefabs/resourceC1.prefab | 4 +- .../Assets/Prefabs/ruin1.prefab | 50 +- .../Assets/Prefabs/ruin2.prefab | 50 +- .../Assets/Prefabs/shadow.prefab | 4 +- .../Assets/Prefabs/shell.prefab | 21 +- .../Assets/Prefabs/space.prefab | 4 +- .../Assets/Resources/ruin1.png.meta | 2 +- .../interface_local/Assets/Scenes/Game.unity | 988 +++++++++++++++++- .../Assets/Scripts/Base/BaseControl.cs | 28 +- .../Assets/Scripts/Bullet.meta | 8 + .../Assets/Scripts/Bullet/BulletControl.cs | 33 + .../Scripts/Bullet/BulletControl.cs.meta | 11 + .../Assets/Scripts/CameraControl.cs | 64 +- .../interface_local/Assets/Scripts/Data.meta | 8 + .../Assets/Scripts/Data/ArcData.asset | 22 + .../Assets/Scripts/Data/ArcData.asset.meta | 8 + .../Assets/Scripts/Data/BulletData.cs | 14 + .../Assets/Scripts/Data/BulletData.cs.meta | 11 + .../Assets/Scripts/Data/LaserData.asset | 21 + .../Assets/Scripts/Data/LaserData.asset.meta | 8 + .../Assets/Scripts/Data/MissileData.asset | 21 + .../Scripts/Data/MissileData.asset.meta | 8 + .../Assets/Scripts/Data/PlasmaData.asset | 21 + .../Assets/Scripts/Data/PlasmaData.asset.meta | 8 + .../Assets/Scripts/Data/ShellData.asset | 21 + .../Assets/Scripts/Data/ShellData.asset.meta | 8 + .../Scripts/InteractBase/InteractBase.cs | 9 +- .../Scripts/InteractBase/InteractBase.cs.meta | 6 +- .../Scripts/InteractBase/InteractControl.cs | 70 ++ .../InteractBase/InteractControl.cs.meta | 11 + .../Assets/Scripts/Map/MapControl.cs | 13 +- .../Assets/Scripts/Message2Clients.cs | 90 +- .../Assets/Scripts/ObjCreater.cs | 78 +- .../Assets/Scripts/ParaDefine.cs | 8 + .../Assets/Scripts/ParaDefine.cs.meta | 11 + .../Assets/Scripts/Player/PlayerControl.cs | 100 +- .../Assets/Scripts/Ship/ShipControl.cs | 94 ++ .../Assets/Scripts/Ship/ShipControl.cs.meta | 11 + .../interface_local/Assets/Scripts/Tool.cs | 12 + .../Assets/Scripts/Tool.cs.meta | 11 + .../Assets/Scripts/UI/UIControl.cs | 19 +- .../BurstAotSettings_WebGL.json | 16 + .../CommonBurstAotSettings.json | 6 + .../ProjectSettings/ProjectSettings.asset | 6 +- .../ProjectSettings/TagManager.asset | 3 + .../UnityConnectSettings.asset | 2 +- 64 files changed, 2536 insertions(+), 209 deletions(-) create mode 100644 interface/interface_local/Assets/Materials/Ship.physicsMaterial2D create mode 100644 interface/interface_local/Assets/Materials/Ship.physicsMaterial2D.meta create mode 100644 interface/interface_local/Assets/Scripts/Bullet.meta create mode 100644 interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs create mode 100644 interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs.meta create mode 100644 interface/interface_local/Assets/Scripts/Data.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/ArcData.asset create mode 100644 interface/interface_local/Assets/Scripts/Data/ArcData.asset.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/BulletData.cs create mode 100644 interface/interface_local/Assets/Scripts/Data/BulletData.cs.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/LaserData.asset create mode 100644 interface/interface_local/Assets/Scripts/Data/LaserData.asset.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/MissileData.asset create mode 100644 interface/interface_local/Assets/Scripts/Data/MissileData.asset.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/PlasmaData.asset create mode 100644 interface/interface_local/Assets/Scripts/Data/PlasmaData.asset.meta create mode 100644 interface/interface_local/Assets/Scripts/Data/ShellData.asset create mode 100644 interface/interface_local/Assets/Scripts/Data/ShellData.asset.meta create mode 100644 interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs create mode 100644 interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs.meta create mode 100644 interface/interface_local/Assets/Scripts/ParaDefine.cs create mode 100644 interface/interface_local/Assets/Scripts/ParaDefine.cs.meta create mode 100644 interface/interface_local/Assets/Scripts/Ship/ShipControl.cs create mode 100644 interface/interface_local/Assets/Scripts/Ship/ShipControl.cs.meta create mode 100644 interface/interface_local/Assets/Scripts/Tool.cs create mode 100644 interface/interface_local/Assets/Scripts/Tool.cs.meta create mode 100644 interface/interface_local/ProjectSettings/BurstAotSettings_WebGL.json create mode 100644 interface/interface_local/ProjectSettings/CommonBurstAotSettings.json diff --git a/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D b/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D new file mode 100644 index 00000000..98450fa1 --- /dev/null +++ b/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D @@ -0,0 +1,11 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!62 &6200000 +PhysicsMaterial2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ship + friction: 0 + bounciness: 0 diff --git a/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D.meta b/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D.meta new file mode 100644 index 00000000..9f603e4e --- /dev/null +++ b/interface/interface_local/Assets/Materials/Ship.physicsMaterial2D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: adabc4b167fed3a4f8f97cd1998edf79 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6200000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Materials/VisualEffectMaterial/Universal Render Pipeline Asset.asset b/interface/interface_local/Assets/Materials/VisualEffectMaterial/Universal Render Pipeline Asset.asset index e20e0320..a5e2b566 100644 --- a/interface/interface_local/Assets/Materials/VisualEffectMaterial/Universal Render Pipeline Asset.asset +++ b/interface/interface_local/Assets/Materials/VisualEffectMaterial/Universal Render Pipeline Asset.asset @@ -82,33 +82,33 @@ MonoBehaviour: m_Textures: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeMainLightShadows: 4 m_PrefilteringModeAdditionalLight: 4 - m_PrefilteringModeAdditionalLightShadows: 1 - m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilteringModeAdditionalLightShadows: 0 + m_PrefilterXRKeywords: 1 + m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeDeferredRendering: 0 + m_PrefilteringModeScreenSpaceOcclusion: 0 + m_PrefilterDebugKeywords: 1 + m_PrefilterWriteRenderingLayers: 1 + m_PrefilterHDROutput: 1 + m_PrefilterSSAODepthNormals: 1 + m_PrefilterSSAOSourceDepthLow: 1 + m_PrefilterSSAOSourceDepthMedium: 1 + m_PrefilterSSAOSourceDepthHigh: 1 + m_PrefilterSSAOInterleaved: 1 + m_PrefilterSSAOBlueNoise: 1 + m_PrefilterSSAOSampleCountLow: 1 + m_PrefilterSSAOSampleCountMedium: 1 + m_PrefilterSSAOSampleCountHigh: 1 + m_PrefilterDBufferMRT1: 1 + m_PrefilterDBufferMRT2: 1 + m_PrefilterDBufferMRT3: 1 + m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityMedium: 1 + m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 + m_PrefilterScreenCoord: 1 + m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 diff --git a/interface/interface_local/Assets/Prefabs/Base.prefab b/interface/interface_local/Assets/Prefabs/Base.prefab index b3e3ff06..59550a32 100644 --- a/interface/interface_local/Assets/Prefabs/Base.prefab +++ b/interface/interface_local/Assets/Prefabs/Base.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 2633087526931125268} - component: {fileID: 185038739592644713} - component: {fileID: 3858766104968319131} - - component: {fileID: 8314998992480060295} + - component: {fileID: 791497468914672102} m_Layer: 6 m_Name: Base m_TagString: Base @@ -29,10 +29,12 @@ Transform: m_GameObject: {fileID: 2487624789702488523} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.549191, y: -2.1501863, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 8432933481313958923} + - {fileID: 8850565933299685759} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!212 &2633087526931125268 @@ -73,8 +75,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 89fd963af7f02e545996b9bcf81cbb0f, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} @@ -99,8 +101,16 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 33624e7926488114892585bc69105bab, type: 3} m_Name: m_EditorClassIdentifier: - economy: 0 - health: 24000 + interactBase: {fileID: 0} + generatePos: + - {x: -2.003803e+15, y: 6.99e-43} + - {x: 0.000042965818, y: 0.00000016502315} + messageOfBase: + x: 0 + y: 0 + hp: 24000 + economy: 0 + playerTeam: 0 --- !u!114 &3858766104968319131 MonoBehaviour: m_ObjectHideFlags: 0 @@ -113,19 +123,25 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 515cf190256e2214ea5daad3164a90b3, type: 3} m_Name: m_EditorClassIdentifier: + interactType: 0 + interactOption: 0 tobeSelected: 0 selected: 0 selectedSign: {fileID: 2362405429118444927, guid: d5b0673cd77cb7f43b9b1df36ceb2520, type: 3} tobeSelectedSign: {fileID: 5230180300230231966, guid: c35172cad03b3784c93db13d884b4bbc, type: 3} tobeseObj: {fileID: 0} seObj: {fileID: 0} ---- !u!65 &8314998992480060295 -BoxCollider: + moveOption: {x: 0, y: 0} + attackOption: {x: 0, y: 0} +--- !u!61 &791497468914672102 +BoxCollider2D: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2487624789702488523} + m_Enabled: 1 + m_Density: 1 m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -134,9 +150,93 @@ BoxCollider: serializedVersion: 2 m_Bits: 0 m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 0.2} - m_Center: {x: 0, y: 0, z: 0} + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!1 &6055395181153264379 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8432933481313958923} + m_Layer: 6 + m_Name: GeneratePosition1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8432933481313958923 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6055395181153264379} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2343335082935178983} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &9183481261199670289 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8850565933299685759} + m_Layer: 6 + m_Name: GeneratePosition2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8850565933299685759 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9183481261199670289} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2343335082935178983} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/interface/interface_local/Assets/Prefabs/Selected.prefab b/interface/interface_local/Assets/Prefabs/Selected.prefab index 024a1213..4ce876cf 100644 --- a/interface/interface_local/Assets/Prefabs/Selected.prefab +++ b/interface/interface_local/Assets/Prefabs/Selected.prefab @@ -27,7 +27,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.5366857, y: 1.5366857, z: 1.5366857} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} diff --git a/interface/interface_local/Assets/Prefabs/afflict_civilship3.prefab b/interface/interface_local/Assets/Prefabs/afflict_civilship3.prefab index bd4ef339..084d22fc 100644 --- a/interface/interface_local/Assets/Prefabs/afflict_civilship3.prefab +++ b/interface/interface_local/Assets/Prefabs/afflict_civilship3.prefab @@ -178,7 +178,10 @@ GameObject: m_Component: - component: {fileID: 3612929307087270911} - component: {fileID: 6770427568174600179} + - component: {fileID: 8760504856506264543} + - component: {fileID: 2882451378615938793} - component: {fileID: -4359886877623418897} + - component: {fileID: 5830000981015486441} m_Layer: 6 m_Name: afflict_civilship3 m_TagString: Untagged @@ -255,6 +258,54 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &8760504856506264543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7171601645716739352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d5ff6b6f4992b54b9765b7e0aa3fc02, type: 3} + m_Name: + m_EditorClassIdentifier: + interactBase: {fileID: 0} + speed: 3 + messageOfShip: + hp: 3000 + armor: 0 + shield: 0 + playerTeam: 0 + shipType: 1 + viewRange: 0 + producerType: 0 + constructorType: 0 + armorType: 0 + shieldType: 0 + weaponType: 1 +--- !u!114 &2882451378615938793 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7171601645716739352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 515cf190256e2214ea5daad3164a90b3, type: 3} + m_Name: + m_EditorClassIdentifier: + interactType: 1 + interactOption: 0 + tobeSelected: 0 + selected: 0 + selectedSign: {fileID: 2362405429118444927, guid: d5b0673cd77cb7f43b9b1df36ceb2520, type: 3} + tobeSelectedSign: {fileID: 5230180300230231966, guid: c35172cad03b3784c93db13d884b4bbc, type: 3} + tobeseObj: {fileID: 0} + seObj: {fileID: 0} + moveOption: {x: 0, y: 0} + attackOption: {x: 0, y: 0} --- !u!50 &-4359886877623418897 Rigidbody2D: serializedVersion: 4 @@ -267,11 +318,11 @@ Rigidbody2D: m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 0 - m_Mass: 1 + m_Mass: 0.1 m_LinearDrag: 0 - m_AngularDrag: 0.05 + m_AngularDrag: 0 m_GravityScale: 0 - m_Material: {fileID: 0} + m_Material: {fileID: 6200000, guid: adabc4b167fed3a4f8f97cd1998edf79, type: 2} m_IncludeLayers: serializedVersion: 2 m_Bits: 0 @@ -281,4 +332,57 @@ Rigidbody2D: m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 1 - m_Constraints: 0 + m_Constraints: 4 +--- !u!60 &5830000981015486441 +PolygonCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7171601645716739352} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1.4222223, y: 1.4222223} + newSize: {x: 1.4222223, y: 1.4222223} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Points: + m_Paths: + - - {x: -0.65203804, y: -0.2703777} + - {x: -0.20493068, y: -0.688784} + - {x: 0.21247491, y: -0.6915976} + - {x: 0.6544107, y: -0.26316732} + - {x: 0.49007905, y: 0.24612868} + - {x: 0.10974354, y: 0.6245806} + - {x: -0.11176881, y: 0.6241703} + - {x: -0.4908295, y: 0.24613677} + m_UseDelaunayMesh: 0 diff --git a/interface/interface_local/Assets/Prefabs/asteroid1.prefab b/interface/interface_local/Assets/Prefabs/asteroid1.prefab index 47125d6d..35244f13 100644 --- a/interface/interface_local/Assets/Prefabs/asteroid1.prefab +++ b/interface/interface_local/Assets/Prefabs/asteroid1.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 1000446588117592332} - component: {fileID: 4060896487484421742} + - component: {fileID: 6339375463996587137} m_Layer: 0 m_Name: asteroid1 m_TagString: Untagged @@ -70,8 +71,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ca8591645aa5c1b42be3a00db68050e4, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} @@ -84,3 +85,48 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!61 &6339375463996587137 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 73901610976941151} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 0.5, y: 0.5} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/interface/interface_local/Assets/Prefabs/asteroid2.prefab b/interface/interface_local/Assets/Prefabs/asteroid2.prefab index 07d6e373..b9f3d7f5 100644 --- a/interface/interface_local/Assets/Prefabs/asteroid2.prefab +++ b/interface/interface_local/Assets/Prefabs/asteroid2.prefab @@ -70,8 +70,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: bfbebd03ad1eba94d97d36f4a8379755, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/asteroid3.prefab b/interface/interface_local/Assets/Prefabs/asteroid3.prefab index 19071316..a3809ae3 100644 --- a/interface/interface_local/Assets/Prefabs/asteroid3.prefab +++ b/interface/interface_local/Assets/Prefabs/asteroid3.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 5366094617809661503} - component: {fileID: 702776585178968798} + - component: {fileID: -9213702189076106267} m_Layer: 0 m_Name: asteroid3 m_TagString: Untagged @@ -70,8 +71,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 7c8a580b4bd61134f9c036fad1092802, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} @@ -84,3 +85,48 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!61 &-9213702189076106267 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 889495328777635882} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 0.5, y: 0.5} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/interface/interface_local/Assets/Prefabs/community.prefab b/interface/interface_local/Assets/Prefabs/community.prefab index 38691f38..4806d5b1 100644 --- a/interface/interface_local/Assets/Prefabs/community.prefab +++ b/interface/interface_local/Assets/Prefabs/community.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 6520154078847335470} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 5.6448474, y: -3.0925283, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -70,8 +70,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 9b6824ba5f9a5044da5da80bf1cbead2, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/disperse_militaryship3.prefab b/interface/interface_local/Assets/Prefabs/disperse_militaryship3.prefab index b80cad8d..ab55ad0f 100644 --- a/interface/interface_local/Assets/Prefabs/disperse_militaryship3.prefab +++ b/interface/interface_local/Assets/Prefabs/disperse_militaryship3.prefab @@ -10,8 +10,11 @@ GameObject: m_Component: - component: {fileID: 6703198644651489217} - component: {fileID: 3937469415223448877} + - component: {fileID: 1188913950130527403} + - component: {fileID: -5704426692081101963} - component: {fileID: 1666208417870257314} - m_Layer: 0 + - component: {fileID: 5170778442484362911} + m_Layer: 6 m_Name: disperse_militaryship3 m_TagString: Untagged m_Icon: {fileID: 0} @@ -27,7 +30,7 @@ Transform: m_GameObject: {fileID: 1718981553063819522} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.5250175, y: -1.1426659, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -87,6 +90,54 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1188913950130527403 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718981553063819522} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d5ff6b6f4992b54b9765b7e0aa3fc02, type: 3} + m_Name: + m_EditorClassIdentifier: + interactBase: {fileID: 0} + speed: 2.8 + messageOfShip: + hp: 4000 + armor: 400 + shield: 400 + playerTeam: 0 + shipType: 2 + viewRange: 0 + producerType: 0 + constructorType: 0 + armorType: 0 + shieldType: 0 + weaponType: 1 +--- !u!114 &-5704426692081101963 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718981553063819522} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 515cf190256e2214ea5daad3164a90b3, type: 3} + m_Name: + m_EditorClassIdentifier: + interactType: 1 + interactOption: 0 + tobeSelected: 0 + selected: 0 + selectedSign: {fileID: 2362405429118444927, guid: d5b0673cd77cb7f43b9b1df36ceb2520, type: 3} + tobeSelectedSign: {fileID: 5230180300230231966, guid: c35172cad03b3784c93db13d884b4bbc, type: 3} + tobeseObj: {fileID: 0} + seObj: {fileID: 0} + moveOption: {x: 0, y: 0} + attackOption: {x: 0, y: 0} --- !u!50 &1666208417870257314 Rigidbody2D: serializedVersion: 4 @@ -113,7 +164,62 @@ Rigidbody2D: m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 1 - m_Constraints: 0 + m_Constraints: 4 +--- !u!60 &5170778442484362911 +PolygonCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718981553063819522} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1.5058824, y: 1.5058824} + newSize: {x: 1.5058824, y: 1.5058824} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Points: + m_Paths: + - - {x: -0.006146442, y: -0.6972494} + - {x: 0.5091776, y: -0.5894133} + - {x: 0.640808, y: -0.39379779} + - {x: 0.6350861, y: 0.04032734} + - {x: 0.3777029, y: 0.58883476} + - {x: 0.0045966506, y: 0.7119452} + - {x: -0.3869319, y: 0.5855302} + - {x: -0.63092756, y: 0.027574211} + - {x: -0.6246743, y: -0.4011431} + - {x: -0.4897193, y: -0.59641504} + m_UseDelaunayMesh: 0 --- !u!1 &6322145347568992764 GameObject: m_ObjectHideFlags: 0 diff --git a/interface/interface_local/Assets/Prefabs/factory.prefab b/interface/interface_local/Assets/Prefabs/factory.prefab index 64717b22..14607601 100644 --- a/interface/interface_local/Assets/Prefabs/factory.prefab +++ b/interface/interface_local/Assets/Prefabs/factory.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 6257076823173944538} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.95, y: -3.27, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -70,8 +70,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 4e69b7691cca9c241a1519d297e81311, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/foreshadow_flagship3.prefab b/interface/interface_local/Assets/Prefabs/foreshadow_flagship3.prefab index d8010e29..27537911 100644 --- a/interface/interface_local/Assets/Prefabs/foreshadow_flagship3.prefab +++ b/interface/interface_local/Assets/Prefabs/foreshadow_flagship3.prefab @@ -178,8 +178,11 @@ GameObject: m_Component: - component: {fileID: 750574882568330089} - component: {fileID: 4697488312729372394} + - component: {fileID: 1957944558398049063} + - component: {fileID: 6878165467408580569} - component: {fileID: 3397589707071195213} - m_Layer: 0 + - component: {fileID: 7800904211505029374} + m_Layer: 6 m_Name: foreshadow_flagship3 m_TagString: Untagged m_Icon: {fileID: 0} @@ -195,7 +198,7 @@ Transform: m_GameObject: {fileID: 8427987949455047532} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.0206661, y: -1.0445273, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -255,6 +258,54 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &1957944558398049063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8427987949455047532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d5ff6b6f4992b54b9765b7e0aa3fc02, type: 3} + m_Name: + m_EditorClassIdentifier: + interactBase: {fileID: 0} + speed: 2.7 + messageOfShip: + hp: 12000 + armor: 800 + shield: 800 + playerTeam: 0 + shipType: 3 + viewRange: 0 + producerType: 0 + constructorType: 0 + armorType: 0 + shieldType: 0 + weaponType: 1 +--- !u!114 &6878165467408580569 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8427987949455047532} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 515cf190256e2214ea5daad3164a90b3, type: 3} + m_Name: + m_EditorClassIdentifier: + interactType: 1 + interactOption: 0 + tobeSelected: 0 + selected: 0 + selectedSign: {fileID: 2362405429118444927, guid: d5b0673cd77cb7f43b9b1df36ceb2520, type: 3} + tobeSelectedSign: {fileID: 5230180300230231966, guid: c35172cad03b3784c93db13d884b4bbc, type: 3} + tobeseObj: {fileID: 0} + seObj: {fileID: 0} + moveOption: {x: 0, y: 0} + attackOption: {x: 0, y: 0} --- !u!50 &3397589707071195213 Rigidbody2D: serializedVersion: 4 @@ -281,4 +332,60 @@ Rigidbody2D: m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 1 - m_Constraints: 0 + m_Constraints: 4 +--- !u!60 &7800904211505029374 +PolygonCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8427987949455047532} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1.6, y: 1.6} + newSize: {x: 1.6, y: 1.6} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Points: + m_Paths: + - - {x: -0.223483, y: 0.7550932} + - {x: -0.5892876, y: 0.53113854} + - {x: -0.7454866, y: 0.14892353} + - {x: -0.7455398, y: -0.16528817} + - {x: -0.32776636, y: -0.7462833} + - {x: 0.3340975, y: -0.7320269} + - {x: 0.7405982, y: -0.16136909} + - {x: 0.7467126, y: 0.1469028} + - {x: 0.57987946, y: 0.52651507} + - {x: 0.23184037, y: 0.75532526} + - {x: -0.0021837428, y: 0.7553253} + m_UseDelaunayMesh: 0 diff --git a/interface/interface_local/Assets/Prefabs/laser.prefab b/interface/interface_local/Assets/Prefabs/laser.prefab index 77ad126d..f7f3627b 100644 --- a/interface/interface_local/Assets/Prefabs/laser.prefab +++ b/interface/interface_local/Assets/Prefabs/laser.prefab @@ -93,6 +93,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1201941676677779376} + - component: {fileID: 7532294776290804330} - component: {fileID: 4187446393248317159} m_Layer: 0 m_Name: laser @@ -111,12 +112,28 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 9124837088931925719} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &7532294776290804330 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5236724725662676995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5141ad9590fdebe40801dacf452415bc, type: 3} + m_Name: + m_EditorClassIdentifier: + bulletData: {fileID: 11400000, guid: 0a85f800f99969a438015046494079c0, type: 2} + messageOfBullet: + type: 0 + playerTeam: 0 --- !u!50 &4187446393248317159 Rigidbody2D: serializedVersion: 4 diff --git a/interface/interface_local/Assets/Prefabs/missile.prefab b/interface/interface_local/Assets/Prefabs/missile.prefab index 4542e9f9..136695a7 100644 --- a/interface/interface_local/Assets/Prefabs/missile.prefab +++ b/interface/interface_local/Assets/Prefabs/missile.prefab @@ -9,6 +9,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 4201782037208779027} + - component: {fileID: -8537481700179265297} - component: {fileID: 787263036322237022} m_Layer: 0 m_Name: missile @@ -26,13 +27,29 @@ Transform: m_GameObject: {fileID: 6742644745694519620} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.4685128, y: 1.7885575, z: -0.1775014} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2044924485689081778} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-8537481700179265297 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6742644745694519620} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5141ad9590fdebe40801dacf452415bc, type: 3} + m_Name: + m_EditorClassIdentifier: + bulletData: {fileID: 11400000, guid: bd428ee77f865f147835a80acdfd9fd2, type: 2} + messageOfBullet: + type: 0 + playerTeam: 0 --- !u!50 &787263036322237022 Rigidbody2D: serializedVersion: 4 diff --git a/interface/interface_local/Assets/Prefabs/plasma.prefab b/interface/interface_local/Assets/Prefabs/plasma.prefab index 6511b38e..b7f97a8d 100644 --- a/interface/interface_local/Assets/Prefabs/plasma.prefab +++ b/interface/interface_local/Assets/Prefabs/plasma.prefab @@ -93,6 +93,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 3329987006929507500} + - component: {fileID: 8590620219904582428} - component: {fileID: 1888889249344211522} m_Layer: 0 m_Name: plasma @@ -110,13 +111,29 @@ Transform: m_GameObject: {fileID: 7049118564761611801} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.4685128, y: 1.7885575, z: -0.1775014} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4078562955258069677} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8590620219904582428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7049118564761611801} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5141ad9590fdebe40801dacf452415bc, type: 3} + m_Name: + m_EditorClassIdentifier: + bulletData: {fileID: 11400000, guid: e4f73ad14d0a78244acba6ac3f0b4a8d, type: 2} + messageOfBullet: + type: 0 + playerTeam: 0 --- !u!50 &1888889249344211522 Rigidbody2D: serializedVersion: 4 diff --git a/interface/interface_local/Assets/Prefabs/resourceA1.prefab b/interface/interface_local/Assets/Prefabs/resourceA1.prefab index 8bfabf72..e93dcf14 100644 --- a/interface/interface_local/Assets/Prefabs/resourceA1.prefab +++ b/interface/interface_local/Assets/Prefabs/resourceA1.prefab @@ -72,8 +72,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 63989317c1fbb7446aa044069dbe9028, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/resourceB1.prefab b/interface/interface_local/Assets/Prefabs/resourceB1.prefab index 0f9d35fc..94bfb6bc 100644 --- a/interface/interface_local/Assets/Prefabs/resourceB1.prefab +++ b/interface/interface_local/Assets/Prefabs/resourceB1.prefab @@ -240,8 +240,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: dc1eac1e18f899d4890462a1eba45dc9, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/resourceC1.prefab b/interface/interface_local/Assets/Prefabs/resourceC1.prefab index ddf5ab53..6ff83614 100644 --- a/interface/interface_local/Assets/Prefabs/resourceC1.prefab +++ b/interface/interface_local/Assets/Prefabs/resourceC1.prefab @@ -72,8 +72,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: d918aceb4efb3f14ab46b302b29155d5, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/ruin1.prefab b/interface/interface_local/Assets/Prefabs/ruin1.prefab index b963c907..efd2b5fc 100644 --- a/interface/interface_local/Assets/Prefabs/ruin1.prefab +++ b/interface/interface_local/Assets/Prefabs/ruin1.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 1462202371890119248} - component: {fileID: 1563948647572733367} + - component: {fileID: -186425019363187993} m_Layer: 0 m_Name: ruin1 m_TagString: Untagged @@ -70,8 +71,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: e246c0e57901dac4292f64487bf020be, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} @@ -84,3 +85,48 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!61 &-186425019363187993 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1304984658260562521} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/interface/interface_local/Assets/Prefabs/ruin2.prefab b/interface/interface_local/Assets/Prefabs/ruin2.prefab index 8c6a22e5..6852e191 100644 --- a/interface/interface_local/Assets/Prefabs/ruin2.prefab +++ b/interface/interface_local/Assets/Prefabs/ruin2.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 4888326390525088488} - component: {fileID: 3202212152911154916} + - component: {fileID: -7425251455312196849} m_Layer: 0 m_Name: ruin2 m_TagString: Untagged @@ -70,8 +71,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: 5e7ef50d1d284c8418b607d6d9206954, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} @@ -84,3 +85,48 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!61 &-7425251455312196849 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2191818354525212035} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/interface/interface_local/Assets/Prefabs/shadow.prefab b/interface/interface_local/Assets/Prefabs/shadow.prefab index 09d758a4..fc9dc0e6 100644 --- a/interface/interface_local/Assets/Prefabs/shadow.prefab +++ b/interface/interface_local/Assets/Prefabs/shadow.prefab @@ -70,8 +70,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 2 m_Sprite: {fileID: 21300000, guid: c9eb6145284531a45bafb3d1e7cee00b, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Prefabs/shell.prefab b/interface/interface_local/Assets/Prefabs/shell.prefab index 3e0af9a0..ac121ecb 100644 --- a/interface/interface_local/Assets/Prefabs/shell.prefab +++ b/interface/interface_local/Assets/Prefabs/shell.prefab @@ -93,6 +93,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 116280945263292980} + - component: {fileID: -8199526034595813093} - component: {fileID: 330809320193030683} m_Layer: 0 m_Name: shell @@ -110,13 +111,29 @@ Transform: m_GameObject: {fileID: 5671706578558220722} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.4685128, y: 1.7885575, z: -0.1775014} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4238342118252321231} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-8199526034595813093 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5671706578558220722} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5141ad9590fdebe40801dacf452415bc, type: 3} + m_Name: + m_EditorClassIdentifier: + bulletData: {fileID: 11400000, guid: 23ccf6674696d814d953e27d4af902d0, type: 2} + messageOfBullet: + type: 0 + playerTeam: 0 --- !u!50 &330809320193030683 Rigidbody2D: serializedVersion: 4 diff --git a/interface/interface_local/Assets/Prefabs/space.prefab b/interface/interface_local/Assets/Prefabs/space.prefab index ce8935a5..5518474f 100644 --- a/interface/interface_local/Assets/Prefabs/space.prefab +++ b/interface/interface_local/Assets/Prefabs/space.prefab @@ -70,8 +70,8 @@ SpriteRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 + m_SortingLayerID: -1026933429 + m_SortingLayer: -1 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ccda3c683fbd7904b949964c6ae92cf3, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/interface/interface_local/Assets/Resources/ruin1.png.meta b/interface/interface_local/Assets/Resources/ruin1.png.meta index 6c596ec5..0145e936 100644 --- a/interface/interface_local/Assets/Resources/ruin1.png.meta +++ b/interface/interface_local/Assets/Resources/ruin1.png.meta @@ -84,7 +84,7 @@ TextureImporter: buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 - textureFormat: -1 + textureFormat: 10 textureCompression: 1 compressionQuality: 50 crunchedCompression: 0 diff --git a/interface/interface_local/Assets/Scenes/Game.unity b/interface/interface_local/Assets/Scenes/Game.unity index f199e8d4..10b51138 100644 --- a/interface/interface_local/Assets/Scenes/Game.unity +++ b/interface/interface_local/Assets/Scenes/Game.unity @@ -249,6 +249,139 @@ RectTransform: m_AnchoredPosition: {x: -0.03929901, y: -0.052000046} m_SizeDelta: {x: -5.7111, y: -20.8503} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &396793515 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 396793516} + - component: {fileID: 396793519} + - component: {fileID: 396793518} + - component: {fileID: 396793517} + m_Layer: 5 + m_Name: Button (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &396793516 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396793515} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1788440551} + m_Father: {fileID: 1123546793} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.52471924, y: 62} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &396793517 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396793515} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.929027, g: 0.9339623, b: 0.6740388, a: 1} + m_PressedColor: {r: 0.9140699, g: 0.9150943, b: 0.47912958, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 396793518} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1698811765} + m_TargetAssemblyTypeName: UIControl, Assembly-CSharp + m_MethodName: BuildMilitaryship + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &396793518 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396793515} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &396793519 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 396793515} + m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -426,6 +559,8 @@ MonoBehaviour: currentScaleTime: 0.5 basicCameraScale: 25 currentScale: 0.5 + cameraSpeedMax: 1.5 + cameraSpeed: 0 --- !u!1 &921343768 GameObject: m_ObjectHideFlags: 0 @@ -436,6 +571,7 @@ GameObject: m_Component: - component: {fileID: 921343770} - component: {fileID: 921343769} + - component: {fileID: 921343772} - component: {fileID: 921343771} m_Layer: 0 m_Name: GameManager @@ -465,6 +601,17 @@ MonoBehaviour: - {fileID: 0} - {fileID: 0} - {fileID: 2487624789702488523, guid: 9ba3f57fff0f3f240aad67b489d717f2, type: 3} + shiplist: + - {fileID: 7171601645716739352, guid: 689388b1ed32205428711466f3794748, type: 3} + - {fileID: 1718981553063819522, guid: a69b4f22edee38141902bab64373c73d, type: 3} + - {fileID: 8427987949455047532, guid: 57d8c0b08e0f19f48a227b34b8b70a0b, type: 3} + bulletList: + - {fileID: 5236724725662676995, guid: ad4363c14d065c040bac11009ace5dc4, type: 3} + - {fileID: 7049118564761611801, guid: e0c55c5797964e045ad780dd1868169b, type: 3} + - {fileID: 5671706578558220722, guid: 9347cf63de3b0c242bac7ee29562d5dd, type: 3} + - {fileID: 6742644745694519620, guid: a2185ad8f0eb43249b555bda1913c662, type: 3} + - {fileID: 0} + mapfa: {fileID: 0} --- !u!4 &921343770 Transform: m_ObjectHideFlags: 0 @@ -474,7 +621,7 @@ Transform: m_GameObject: {fileID: 921343768} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.025674, y: -0.96532345, z: 0.05712587} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -498,6 +645,25 @@ MonoBehaviour: tobeSelectedInt: [] selectedInt: [] selectingAll: 0 + enabledInteract: + selectedOption: 0 +--- !u!114 &921343772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 921343768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 561c648cd157767499a93243d13b6718, type: 3} + m_Name: + m_EditorClassIdentifier: + laserData: {fileID: 11400000, guid: 0a85f800f99969a438015046494079c0, type: 2} + plasmaData: {fileID: 11400000, guid: e4f73ad14d0a78244acba6ac3f0b4a8d, type: 2} + shellData: {fileID: 11400000, guid: 23ccf6674696d814d953e27d4af902d0, type: 2} + missileData: {fileID: 11400000, guid: bd428ee77f865f147835a80acdfd9fd2, type: 2} + arcData: {fileID: 11400000, guid: 4758f2e9f24bebf45a9517cf2f743093, type: 2} --- !u!1 &1084531560 GameObject: m_ObjectHideFlags: 0 @@ -573,6 +739,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1084531560} m_CullTransparentMesh: 1 +--- !u!1 &1113266028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1113266029} + - component: {fileID: 1113266031} + - component: {fileID: 1113266030} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1113266029 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1113266028} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1540196421} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1113266030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1113266028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Build Civilship + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 20 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1113266031 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1113266028} + m_CullTransparentMesh: 1 --- !u!1 &1121307702 GameObject: m_ObjectHideFlags: 0 @@ -622,6 +922,263 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1123546792 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1123546793} + - component: {fileID: 1123546795} + - component: {fileID: 1123546794} + - component: {fileID: 1123546796} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1123546793 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1123546792} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1540196421} + - {fileID: 396793516} + - {fileID: 1602801900} + m_Father: {fileID: 1698811764} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -88.97522, y: 0} + m_SizeDelta: {x: 176.95038, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1123546794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1123546792} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.29803923} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1123546795 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1123546792} + m_CullTransparentMesh: 1 +--- !u!61 &1123546796 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1123546792} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0, y: 0} + oldSize: {x: 0, y: 0} + newSize: {x: 0, y: 0} + adaptiveTilingThreshold: 0 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!1 &1540196420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1540196421} + - component: {fileID: 1540196424} + - component: {fileID: 1540196423} + - component: {fileID: 1540196422} + m_Layer: 5 + m_Name: Button (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1540196421 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1540196420} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1113266029} + m_Father: {fileID: 1123546793} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.52471924, y: 103} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1540196422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1540196420} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.929027, g: 0.9339623, b: 0.6740388, a: 1} + m_PressedColor: {r: 0.9140699, g: 0.9150943, b: 0.47912958, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1540196423} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1698811765} + m_TargetAssemblyTypeName: UIControl, Assembly-CSharp + m_MethodName: BuildCivilship + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1540196423 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1540196420} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1540196424 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1540196420} + m_CullTransparentMesh: 1 --- !u!1 &1587554091 GameObject: m_ObjectHideFlags: 0 @@ -659,7 +1216,7 @@ MonoBehaviour: m_Intensity: 1 m_LightVolumeIntensity: 1 m_LightVolumeIntensityEnabled: 0 - m_ApplyToSortingLayers: 00000000 + m_ApplyToSortingLayers: 000000004b3dcac2 m_LightCookieSprite: {fileID: 0} m_DeprecatedPointLightCookieSprite: {fileID: 0} m_LightOrder: 0 @@ -742,13 +1299,149 @@ MonoBehaviour: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1601661171} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2373cf44b5b432f4faa9a0c710bc5057, type: 3} - m_Name: - m_EditorClassIdentifier: - mapFa: {fileID: 0} + m_GameObject: {fileID: 1601661171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2373cf44b5b432f4faa9a0c710bc5057, type: 3} + m_Name: + m_EditorClassIdentifier: + mapFa: {fileID: 0} + bases: + - {fileID: 0} + - {fileID: 0} +--- !u!1 &1602801899 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1602801900} + - component: {fileID: 1602801903} + - component: {fileID: 1602801902} + - component: {fileID: 1602801901} + m_Layer: 5 + m_Name: Button (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1602801900 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1602801899} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1987341209} + m_Father: {fileID: 1123546793} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -0.52471924, y: 22.6} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1602801901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1602801899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.929027, g: 0.9339623, b: 0.6740388, a: 1} + m_PressedColor: {r: 0.9140699, g: 0.9150943, b: 0.47912958, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1602801902} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1698811765} + m_TargetAssemblyTypeName: UIControl, Assembly-CSharp + m_MethodName: BuildFlagship + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1602801902 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1602801899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1602801903 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1602801899} + m_CullTransparentMesh: 1 --- !u!1 &1638304791 GameObject: m_ObjectHideFlags: 0 @@ -851,8 +1544,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 127.1, y: -100.600006} - m_SizeDelta: {x: 200, y: 50} + m_AnchoredPosition: {x: 74.619995, y: -85.67} + m_SizeDelta: {x: 95.04, y: 20.14} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1644358103 MonoBehaviour: @@ -1020,8 +1713,8 @@ Canvas: m_GameObject: {fileID: 1698811760} m_Enabled: 1 serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} + m_RenderMode: 1 + m_Camera: {fileID: 519420031} m_PlaneDistance: 100 m_PixelPerfect: 0 m_ReceivesEvents: 1 @@ -1048,6 +1741,7 @@ RectTransform: m_Children: - {fileID: 285166698} - {fileID: 1644358102} + - {fileID: 1123546793} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -1204,6 +1898,274 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1751175913} m_CullTransparentMesh: 1 +--- !u!1 &1788440550 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1788440551} + - component: {fileID: 1788440553} + - component: {fileID: 1788440552} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1788440551 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1788440550} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 396793516} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1788440552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1788440550} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Build Militaryship + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 20 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1788440553 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1788440550} + m_CullTransparentMesh: 1 +--- !u!1 &1987341208 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1987341209} + - component: {fileID: 1987341211} + - component: {fileID: 1987341210} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1987341209 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987341208} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1602801900} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1987341210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987341208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Build Flagship + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 20 + m_fontSizeBase: 20 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1987341211 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1987341208} + m_CullTransparentMesh: 1 --- !u!1 &2129014470 GameObject: m_ObjectHideFlags: 0 diff --git a/interface/interface_local/Assets/Scripts/Base/BaseControl.cs b/interface/interface_local/Assets/Scripts/Base/BaseControl.cs index dee5b624..e0dcee53 100644 --- a/interface/interface_local/Assets/Scripts/Base/BaseControl.cs +++ b/interface/interface_local/Assets/Scripts/Base/BaseControl.cs @@ -4,22 +4,42 @@ public class BaseControl : MonoBehaviour { - public int economy = 0; - public int health = 24000; + public InteractBase interactBase; + public Vector2[] generatePos = new Vector2[2]; + [SerializeField] + public MessageOfBase messageOfBase; // Start is called before the first frame update void Start() { + interactBase = GetComponent(); + generatePos[0] = transform.Find("GeneratePosition1").position; + generatePos[1] = transform.Find("GeneratePosition2").position; StartCoroutine(economyUpdate()); } // Update is called once per frame void Update() { - + switch (interactBase.interactOption) + { + case InteractControl.InteractOption.BuildCivil: + ObjCreater.GetInstance().CreateObj(ShipType.CIVILIAN_SHIP, generatePos[Tool.GetInstance().GetRandom(0, 2)]).GetComponent() + .messageOfShip.playerTeam = messageOfBase.playerTeam; + break; + case InteractControl.InteractOption.BuildMilitary: + ObjCreater.GetInstance().CreateObj(ShipType.MILITARY_SHIP, generatePos[Tool.GetInstance().GetRandom(0, 2)]).GetComponent() + .messageOfShip.playerTeam = messageOfBase.playerTeam; + break; + case InteractControl.InteractOption.BuildFlag: + ObjCreater.GetInstance().CreateObj(ShipType.FLAG_SHIP, generatePos[Tool.GetInstance().GetRandom(0, 2)]).GetComponent() + .messageOfShip.playerTeam = messageOfBase.playerTeam; + break; + default: break; + } } IEnumerator economyUpdate() { - economy++; + messageOfBase.economy++; yield return new WaitForSeconds(1); StartCoroutine(economyUpdate()); } diff --git a/interface/interface_local/Assets/Scripts/Bullet.meta b/interface/interface_local/Assets/Scripts/Bullet.meta new file mode 100644 index 00000000..37576731 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Bullet.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 450646bdd133b5b479a33c53b4d9e433 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs b/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs new file mode 100644 index 00000000..4e519de6 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs @@ -0,0 +1,33 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class BulletControl : MonoBehaviour +{ + public BulletData bulletData; + public MessageOfBullet messageOfBullet; + float lifeTime; + Rigidbody2D rb; + void Start() + { + rb = GetComponent(); + } + void Update() + { + lifeTime += Time.deltaTime; + Debug.Log(rb.velocity); + if (lifeTime > bulletData.attackDistance / bulletData.speed) + Destroy(gameObject); + } + private void OntriggetEnter2D(Collider2D collider2D) + { + if (collider2D.CompareTag("Ship")) + { + if (collider2D.GetComponent().messageOfShip.playerTeam != messageOfBullet.playerTeam) + { + Debug.Log("hit!"); + Destroy(gameObject); + } + } + } +} diff --git a/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs.meta b/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs.meta new file mode 100644 index 00000000..3a9af203 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Bullet/BulletControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5141ad9590fdebe40801dacf452415bc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/CameraControl.cs b/interface/interface_local/Assets/Scripts/CameraControl.cs index 3b71beb6..db372839 100644 --- a/interface/interface_local/Assets/Scripts/CameraControl.cs +++ b/interface/interface_local/Assets/Scripts/CameraControl.cs @@ -1,6 +1,5 @@ using System.Collections; using System.Collections.Generic; -using UnityEditor.UIElements; using UnityEngine; public class CameraControl : MonoBehaviour @@ -8,6 +7,7 @@ public class CameraControl : MonoBehaviour Vector2 mousePos; public AnimationCurve cameraScaleCurve; public float currentScaleTime = 0.5f, basicCameraScale, currentScale; + public float cameraSpeedMax = 1.5f, cameraSpeed; void Start() { currentScale = cameraScaleCurve.Evaluate(currentScaleTime) * basicCameraScale; @@ -18,30 +18,50 @@ void Start() void Update() { mousePos = Input.mousePosition; - if (Input.GetKey(KeyCode.A)) - transform.Translate(Vector3.left * Time.deltaTime * currentScale * 1.5f); - if (Input.GetKey(KeyCode.D)) - transform.Translate(Vector3.right * Time.deltaTime * currentScale * 1.5f); - if (Input.GetKey(KeyCode.W)) - transform.Translate(Vector3.up * Time.deltaTime * currentScale * 1.5f); - if (Input.GetKey(KeyCode.S)) - transform.Translate(Vector3.down * Time.deltaTime * currentScale * 1.5f); - if (Input.mouseScrollDelta.y < 0) + // Debug.Log(mousePos); + if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.S)) { - currentScaleTime = Mathf.Min(1f, currentScaleTime + 0.02f); - - currentScale = cameraScaleCurve.Evaluate(currentScaleTime) * basicCameraScale; - Camera.main.transform.position = Camera.main.ScreenToWorldPoint(mousePos) + - currentScale / Camera.main.orthographicSize * (Camera.main.transform.position - Camera.main.ScreenToWorldPoint(mousePos)); - Camera.main.orthographicSize = currentScale; + cameraSpeed = Mathf.Lerp(cameraSpeed, cameraSpeedMax, 0.1f); + if (Input.GetKey(KeyCode.A)) + { + transform.Translate(Vector3.left * Time.deltaTime * currentScale * cameraSpeed); + } + if (Input.GetKey(KeyCode.D)) + { + transform.Translate(Vector3.right * Time.deltaTime * currentScale * cameraSpeed); + } + if (Input.GetKey(KeyCode.W)) + { + transform.Translate(Vector3.up * Time.deltaTime * currentScale * cameraSpeed); + } + if (Input.GetKey(KeyCode.S)) + { + transform.Translate(Vector3.down * Time.deltaTime * currentScale * cameraSpeed); + } + } + else + { + cameraSpeed = Mathf.Lerp(cameraSpeed, 0, 0.1f); } - if (Input.mouseScrollDelta.y > 0) + if (mousePos.x > 0 && mousePos.x < Screen.width && mousePos.y > 0 && mousePos.y < Screen.height) { - currentScaleTime = Mathf.Max(0f, currentScaleTime - 0.02f); - currentScale = cameraScaleCurve.Evaluate(currentScaleTime) * basicCameraScale; - Camera.main.transform.position = Camera.main.ScreenToWorldPoint(mousePos) + - currentScale / Camera.main.orthographicSize * (Camera.main.transform.position - Camera.main.ScreenToWorldPoint(mousePos)); - Camera.main.orthographicSize = currentScale; + if (Input.mouseScrollDelta.y < 0) + { + currentScaleTime = Mathf.Min(1f, currentScaleTime + 0.02f); + + currentScale = cameraScaleCurve.Evaluate(currentScaleTime) * basicCameraScale; + Camera.main.transform.position = Camera.main.ScreenToWorldPoint(mousePos) + + currentScale / Camera.main.orthographicSize * (Camera.main.transform.position - Camera.main.ScreenToWorldPoint(mousePos)); + Camera.main.orthographicSize = currentScale; + } + if (Input.mouseScrollDelta.y > 0) + { + currentScaleTime = Mathf.Max(0f, currentScaleTime - 0.02f); + currentScale = cameraScaleCurve.Evaluate(currentScaleTime) * basicCameraScale; + Camera.main.transform.position = Camera.main.ScreenToWorldPoint(mousePos) + + currentScale / Camera.main.orthographicSize * (Camera.main.transform.position - Camera.main.ScreenToWorldPoint(mousePos)); + Camera.main.orthographicSize = currentScale; + } } } } diff --git a/interface/interface_local/Assets/Scripts/Data.meta b/interface/interface_local/Assets/Scripts/Data.meta new file mode 100644 index 00000000..5db987c0 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f7dc5cf8a852b44db13be8ac42abb00 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/ArcData.asset b/interface/interface_local/Assets/Scripts/Data/ArcData.asset new file mode 100644 index 00000000..edc0e0ce --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/ArcData.asset @@ -0,0 +1,22 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5a82f5376adfa14893e400fba4af4f5, type: 3} + m_Name: ArcData + m_EditorClassIdentifier: + attackDistance: 8 + explosionRange: 0 + attackDamage: + - 100 + - 3200 + armorDamageMultiplier: 2 + shieldDamageMultiplier: 2 + speed: 8 diff --git a/interface/interface_local/Assets/Scripts/Data/ArcData.asset.meta b/interface/interface_local/Assets/Scripts/Data/ArcData.asset.meta new file mode 100644 index 00000000..d5783872 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/ArcData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4758f2e9f24bebf45a9517cf2f743093 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/BulletData.cs b/interface/interface_local/Assets/Scripts/Data/BulletData.cs new file mode 100644 index 00000000..d074392d --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/BulletData.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu(fileName = "BulletData", menuName = "GameData/BulletData", order = 0)] +public class BulletData : ScriptableObject +{ + public float attackDistance; + public float explosionRange; + public float[] attackDamage; + public float armorDamageMultiplier; + public float shieldDamageMultiplier; + public float speed; +} diff --git a/interface/interface_local/Assets/Scripts/Data/BulletData.cs.meta b/interface/interface_local/Assets/Scripts/Data/BulletData.cs.meta new file mode 100644 index 00000000..256f7ee1 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/BulletData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f5a82f5376adfa14893e400fba4af4f5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/LaserData.asset b/interface/interface_local/Assets/Scripts/Data/LaserData.asset new file mode 100644 index 00000000..4522e769 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/LaserData.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5a82f5376adfa14893e400fba4af4f5, type: 3} + m_Name: LaserData + m_EditorClassIdentifier: + attackDistance: 4 + explosionRange: 0 + attackDamage: + - 1200 + armorDamageMultiplier: 1.5 + shieldDamageMultiplier: 0.6 + speed: 20 diff --git a/interface/interface_local/Assets/Scripts/Data/LaserData.asset.meta b/interface/interface_local/Assets/Scripts/Data/LaserData.asset.meta new file mode 100644 index 00000000..f6bee7cb --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/LaserData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a85f800f99969a438015046494079c0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/MissileData.asset b/interface/interface_local/Assets/Scripts/Data/MissileData.asset new file mode 100644 index 00000000..67613e48 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/MissileData.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5a82f5376adfa14893e400fba4af4f5, type: 3} + m_Name: MissileData + m_EditorClassIdentifier: + attackDistance: 8 + explosionRange: 1.6 + attackDamage: + - 1600 + armorDamageMultiplier: 1 + shieldDamageMultiplier: -1 + speed: 6 diff --git a/interface/interface_local/Assets/Scripts/Data/MissileData.asset.meta b/interface/interface_local/Assets/Scripts/Data/MissileData.asset.meta new file mode 100644 index 00000000..5e72b56d --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/MissileData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd428ee77f865f147835a80acdfd9fd2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset b/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset new file mode 100644 index 00000000..57b0a9c8 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5a82f5376adfa14893e400fba4af4f5, type: 3} + m_Name: PlasmaData + m_EditorClassIdentifier: + attackDistance: 4 + explosionRange: 0 + attackDamage: + - 1300 + armorDamageMultiplier: 2 + shieldDamageMultiplier: 0.4 + speed: 10 diff --git a/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset.meta b/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset.meta new file mode 100644 index 00000000..7e712b70 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/PlasmaData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4f73ad14d0a78244acba6ac3f0b4a8d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Data/ShellData.asset b/interface/interface_local/Assets/Scripts/Data/ShellData.asset new file mode 100644 index 00000000..e7c5bbc3 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/ShellData.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5a82f5376adfa14893e400fba4af4f5, type: 3} + m_Name: ShellData + m_EditorClassIdentifier: + attackDistance: 4 + explosionRange: 0 + attackDamage: + - 1800 + armorDamageMultiplier: 0.4 + shieldDamageMultiplier: 1.5 + speed: 8 diff --git a/interface/interface_local/Assets/Scripts/Data/ShellData.asset.meta b/interface/interface_local/Assets/Scripts/Data/ShellData.asset.meta new file mode 100644 index 00000000..48cde017 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Data/ShellData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23ccf6674696d814d953e27d4af902d0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs b/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs index ce91b010..d4d21e7a 100644 --- a/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs +++ b/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs @@ -1,18 +1,21 @@ +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class InteractBase : MonoBehaviour { - + public InteractControl.InteractType interactType; + public InteractControl.InteractOption interactOption; public bool tobeSelected, selected; public GameObject selectedSign, tobeSelectedSign, tobeseObj, seObj; + public Vector2 moveOption, attackOption; void Update() { if (tobeSelected) { if (!tobeseObj) - tobeseObj = Instantiate(tobeSelectedSign, transform.position, Quaternion.identity); + tobeseObj = Instantiate(tobeSelectedSign, transform.position, Quaternion.identity, transform); } else { @@ -22,7 +25,7 @@ void Update() if (selected) { if (!seObj) - seObj = Instantiate(selectedSign, transform.position, Quaternion.identity); + seObj = Instantiate(selectedSign, transform.position, Quaternion.identity, transform); } else { diff --git a/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs.meta b/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs.meta index 32d72f52..2251e595 100644 --- a/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs.meta +++ b/interface/interface_local/Assets/Scripts/InteractBase/InteractBase.cs.meta @@ -3,7 +3,11 @@ guid: 515cf190256e2214ea5daad3164a90b3 MonoImporter: externalObjects: {} serializedVersion: 2 - defaultReferences: [] + defaultReferences: + - selectedSign: {fileID: 2362405429118444927, guid: d5b0673cd77cb7f43b9b1df36ceb2520, type: 3} + - tobeSelectedSign: {fileID: 5230180300230231966, guid: c35172cad03b3784c93db13d884b4bbc, type: 3} + - tobeseObj: {instanceID: 0} + - seObj: {instanceID: 0} executionOrder: 0 icon: {instanceID: 0} userData: diff --git a/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs b/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs new file mode 100644 index 00000000..667cd652 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs @@ -0,0 +1,70 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class InteractControl : Singleton +{ + public enum InteractType + { + Base, + Ship, + + } + public enum InteractOption + { + None, + BuildCivil, + BuildMilitary, + BuildFlag, + RecycleShip, + RecoverShip, + InstallModuleArmor1, + InstallModuleArmor2, + InstallModuleArmor3, + InstallModuleShield1, + InstallModuleShield2, + InstallModuleShield3, + InstallModuleProducer1, + InstallModuleProducer2, + InstallModuleProducer3, + InstallModuleConstructor1, + InstallModuleConstructor2, + InstallModuleConstructor3, + InstallModuleLaserGun, + InstallModulePlasmaGun, + InstallModuleShellGun, + InstallModuleMissileGun, + InstallModuleArcGun, + + } + public readonly Dictionary> interactOptions = new Dictionary>(){ + {InteractType.Base, + new List{ + InteractOption.BuildCivil, + InteractOption.BuildMilitary, + InteractOption.BuildFlag, + }}, + {InteractType.Ship, + new List{ + InteractOption.RecycleShip, + InteractOption.RecoverShip, + InteractOption.InstallModuleArmor1, + InteractOption.InstallModuleArmor2, + InteractOption.InstallModuleArmor3, + InteractOption.InstallModuleShield1, + InteractOption.InstallModuleShield2, + InteractOption.InstallModuleShield3, + InteractOption.InstallModuleProducer1, + InteractOption.InstallModuleProducer2, + InteractOption.InstallModuleProducer3, + InteractOption.InstallModuleConstructor1, + InteractOption.InstallModuleConstructor2, + InteractOption.InstallModuleConstructor3, + InteractOption.InstallModuleLaserGun, + InteractOption.InstallModulePlasmaGun, + InteractOption.InstallModuleShellGun, + InteractOption.InstallModuleMissileGun, + InteractOption.InstallModuleArcGun, + }}, + }; +} diff --git a/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs.meta b/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs.meta new file mode 100644 index 00000000..f0139e53 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/InteractBase/InteractControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a023ae9e77955c4589ec7136f9281df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Map/MapControl.cs b/interface/interface_local/Assets/Scripts/Map/MapControl.cs index beb1cbe3..d8ab4ad2 100644 --- a/interface/interface_local/Assets/Scripts/Map/MapControl.cs +++ b/interface/interface_local/Assets/Scripts/Map/MapControl.cs @@ -5,6 +5,7 @@ public class MapControl : MonoBehaviour { public GameObject mapFa; + public GameObject[] bases = new GameObject[2]; public static uint[,] Map = new uint[50, 50] { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 2, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 4, 0, 0, 5, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 7, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 1 }, { 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 1 }, { 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 0, 5, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1 }, { 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 2, 4, 0, 0, 0, 1 }, { 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 1 }, { 1, 0, 1, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 1, 0, 2, 2, 2, 0, 1 }, { 1, 0, 1, 0, 0, 1, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 1 }, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 1, 0, 1 }, { 1, 0, 0, 0, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 1, 2, 0, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 0, 2, 1, 0, 1 }, { 1, 0, 0, 1, 0, 2, 1, 0, 4, 2, 2, 0, 1, 1, 1, 2, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 1, 1, 0, 1 }, { 1, 0, 0, 1, 1, 2, 1, 2, 0, 2, 2, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 1, 1, 0, 0, 5, 0, 2, 2, 1, 0, 1 }, { 1, 0, 2, 2, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, 2, 1, 1, 0, 1 }, { 1, 0, 2, 2, 2, 0, 1, 1, 2, 2, 2, 0, 0, 0, 0, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 5, 0, 2, 2, 2, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1 }, { 1, 0, 2, 2, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 2, 2, 2, 0, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1, 2, 4, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 3, 3, 0, 2, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 0, 2, 3, 3, 2, 3, 3, 3, 3, 6, 6, 3, 0, 0, 3, 3, 3, 3, 0, 0, 1 }, { 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 }, { 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 }, { 1, 0, 0, 3, 3, 3, 3, 0, 0, 3, 6, 6, 3, 3, 3, 3, 2, 3, 3, 2, 0, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 0, 3, 3, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 0, 2, 2, 2, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 2, 2, 2, 0, 1 }, { 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 2, 2, 2, 0, 5, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 0, 0, 0, 0, 2, 2, 2, 1, 1, 0, 2, 2, 2, 0, 1 }, { 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 2, 2, 0, 1 }, { 1, 0, 1, 2, 2, 0, 5, 0, 0, 1, 1, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 1, 0, 0, 0, 2, 2, 0, 2, 1, 2, 1, 1, 0, 0, 1 }, { 1, 0, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 2, 1, 1, 1, 0, 2, 2, 4, 0, 1, 2, 0, 1, 0, 0, 1 }, { 1, 0, 1, 2, 0, 2, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 0, 2, 1, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 0, 0, 0, 1 }, { 1, 0, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1 }, { 1, 0, 0, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 1, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 1, 0, 0, 1, 0, 1 }, { 1, 0, 2, 2, 2, 0, 1, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 0, 1 }, { 1, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1 }, { 1, 0, 0, 0, 4, 2, 0, 0, 0, 2, 2, 2, 0, 2, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1 }, { 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 5, 0, 1, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1 }, { 1, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1 }, { 1, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 7, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 2, 5, 0, 0, 4, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; // Start is called before the first frame update void Start() @@ -19,9 +20,19 @@ void DrawMap(uint[,] map) { for (int j = 0; j < 50; j++) { - ObjCreater.GetInstance().CreateObj((PlaceType)map[i, j], new Vector2(j, 50 - i)); + if ((PlaceType)map[i, j] == PlaceType.HOME) + { + if (!bases[0]) + bases[0] = ObjCreater.GetInstance().CreateObj((PlaceType)map[i, j], new Vector2(j, 50 - i)); + else + bases[1] = ObjCreater.GetInstance().CreateObj((PlaceType)map[i, j], new Vector2(j, 50 - i)); + } + else + ObjCreater.GetInstance().CreateObj((PlaceType)map[i, j], new Vector2(j, 50 - i)); } } + bases[0].GetComponent().messageOfBase.playerTeam = PlayerTeam.BLUE; + bases[1].GetComponent().messageOfBase.playerTeam = PlayerTeam.RED; } // Update is called once per frame void Update() diff --git a/interface/interface_local/Assets/Scripts/Message2Clients.cs b/interface/interface_local/Assets/Scripts/Message2Clients.cs index 07fca8b1..a1ae75a5 100644 --- a/interface/interface_local/Assets/Scripts/Message2Clients.cs +++ b/interface/interface_local/Assets/Scripts/Message2Clients.cs @@ -1,50 +1,41 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +[System.Serializable] public struct MessageOfShip { - int x; - int y; - int speed; - int hp; - int armor; - int shield; - int team_id; - int player_id; - int guid; - ShipState ship_state; - ShipType ship_type; - int view_range; - ProducerType producer_type; - ConstructorType constructor_type; - ArmorType armor_type; - ShieldType shield_type; - WeaponType weapon_type; - double facing_direction; -} - - + // public int x; + // public int y; + // public int speed; + public int hp; + public int armor; + public int shield; + public PlayerTeam playerTeam; + // public int playerId; + // public ShipState shipState; + public ShipType shipType; + public int viewRange; + public ProducerType producerType; + public ConstructorType constructorType; + public ArmorType armorType; + public ShieldType shieldType; + public WeaponType weaponType; + // public double facingDirection; +} + + +[System.Serializable] public struct MessageOfBullet { - BulletType type; - int x; - int y; - double facing_direction; - int damage; - int team_id; - int guid; - double bomb_range; - int speed; -} - -public struct MessageOfBombedBullet //for Unity,直接继承自THUAI5 -{ - BulletType type; - int x; - int y; - double facing_direction; - int mapping_id; - double bomb_range; + public BulletType type; + // public int x; + // public int y; + // public double facing_direction; + // public int damage; + public PlayerTeam playerTeam; + // public int guid; + // public double bombRange; + // public int speed; } public struct MessageOfFactory @@ -80,17 +71,18 @@ public struct MessageOfWormhole public struct MessageOfResource { - int x; - int y; - int progress; // 采集进度 + public int x; + public int y; + public int progress; // 采集进度 } - -public struct MessageOfHome +[System.Serializable] +public struct MessageOfBase { - int x; - int y; - int hp; - int team_id; + public int x; + public int y; + public int hp; + public int economy; + public PlayerTeam playerTeam; } public struct MessageOfMap diff --git a/interface/interface_local/Assets/Scripts/ObjCreater.cs b/interface/interface_local/Assets/Scripts/ObjCreater.cs index 69e2e0f8..cdb9b555 100644 --- a/interface/interface_local/Assets/Scripts/ObjCreater.cs +++ b/interface/interface_local/Assets/Scripts/ObjCreater.cs @@ -1,47 +1,101 @@ using System.Collections; using System.Collections.Generic; +using Unity.Mathematics; using UnityEngine; public class ObjCreater : SingletonMono { - public GameObject[] placeList; - public void CreateObj(PlaceType placeType, Vector2 Pos) + public GameObject[] placeList, shiplist, bulletList; + public Transform mapfa; + public GameObject CreateObj(PlaceType placeType, Vector2 Pos) { switch (placeType) { case PlaceType.SPACE: if (placeList[0]) - Instantiate(placeList[0], Pos, Quaternion.identity); + return Instantiate(placeList[0], Pos, Quaternion.identity, mapfa); break; case PlaceType.RUIN: if (placeList[1]) - Instantiate(placeList[1], Pos, Quaternion.identity); + return Instantiate(placeList[1], Pos, Quaternion.identity, mapfa); break; case PlaceType.SHADOW: if (placeList[2]) - Instantiate(placeList[2], Pos, Quaternion.identity); + return Instantiate(placeList[2], Pos, Quaternion.identity, mapfa); break; case PlaceType.ASTEROID: if (placeList[3]) - Instantiate(placeList[3], Pos, Quaternion.identity); + return Instantiate(placeList[3], Pos, Quaternion.identity, mapfa); break; case PlaceType.RESOURCE: if (placeList[4]) - Instantiate(placeList[4], Pos, Quaternion.identity); + return Instantiate(placeList[4], Pos, Quaternion.identity, mapfa); break; case PlaceType.CONSTRUCTION: if (placeList[5]) - Instantiate(placeList[5], Pos, Quaternion.identity); + return Instantiate(placeList[5], Pos, Quaternion.identity, mapfa); break; case PlaceType.WORMHOLE: if (placeList[6]) - Instantiate(placeList[6], Pos, Quaternion.identity); + return Instantiate(placeList[6], Pos, Quaternion.identity, mapfa); break; case PlaceType.HOME: if (placeList[7]) - Instantiate(placeList[7], Pos, Quaternion.identity); + return Instantiate(placeList[7], Pos, Quaternion.identity, mapfa); break; - default: break; } + return null; } -} + public GameObject CreateObj(ShipType shipType, Vector2 Pos) + { + switch (shipType) + { + case ShipType.CIVILIAN_SHIP: + if (shiplist[0]) + return Instantiate(shiplist[0], Pos, Quaternion.identity); + break; + case ShipType.MILITARY_SHIP: + if (shiplist[1]) + return Instantiate(shiplist[1], Pos, Quaternion.identity); + break; + case ShipType.FLAG_SHIP: + if (shiplist[2]) + return Instantiate(shiplist[2], Pos, Quaternion.identity); + break; + } + return null; + } + public GameObject CreateObj(BulletType bulletType, Vector2 Pos, Quaternion quaternion) + { + { + switch (bulletType) + { + case BulletType.LASER: + if (bulletList[0]) + return Instantiate(bulletList[0], Pos, quaternion); + break; + case BulletType.PLASMA: + if (bulletList[1]) + return Instantiate(bulletList[1], Pos, quaternion); + break; + case BulletType.SHELL: + if (bulletList[2]) + return Instantiate(bulletList[2], Pos, quaternion); + break; + case BulletType.MISSILE: + if (bulletList[3]) + return Instantiate(bulletList[3], Pos, quaternion); + break; + case BulletType.ARC: + if (bulletList[4]) + return Instantiate(bulletList[4], Pos, quaternion); + break; + } + return null; + } + void Start() + { + mapfa = GameObject.Find("Map").transform; + } + } +} \ No newline at end of file diff --git a/interface/interface_local/Assets/Scripts/ParaDefine.cs b/interface/interface_local/Assets/Scripts/ParaDefine.cs new file mode 100644 index 00000000..96c250fa --- /dev/null +++ b/interface/interface_local/Assets/Scripts/ParaDefine.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ParaDefine : SingletonMono +{ + public BulletData laserData, plasmaData, shellData, missileData, arcData; +} diff --git a/interface/interface_local/Assets/Scripts/ParaDefine.cs.meta b/interface/interface_local/Assets/Scripts/ParaDefine.cs.meta new file mode 100644 index 00000000..ed795979 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/ParaDefine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 561c648cd157767499a93243d13b6718 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Player/PlayerControl.cs b/interface/interface_local/Assets/Scripts/Player/PlayerControl.cs index ca7b441c..5b72fce7 100644 --- a/interface/interface_local/Assets/Scripts/Player/PlayerControl.cs +++ b/interface/interface_local/Assets/Scripts/Player/PlayerControl.cs @@ -1,13 +1,16 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.EventSystems; -public class PlayerControl : MonoBehaviour +public class PlayerControl : SingletonMono { public LayerMask interactableLayer; - RaycastHit raycastHit; + Collider2D raycaster; public List tobeSelectedInt, selectedInt; public bool selectingAll; + public List enabledInteract; + public InteractControl.InteractOption selectedOption; void Start() { @@ -16,20 +19,43 @@ void Start() // Update is called once per frame void Update() { - Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); - if (Physics.Raycast(ray, out raycastHit, interactableLayer)) + testInput(); + CheckInteract(); + UpdateInteractList(); + Interact(); + ShipMpve(); + ShipAttack(); + } + void testInput() + { + } + void CheckInteract() + { + raycaster = Physics2D.OverlapPoint(Camera.main.ScreenToWorldPoint(Input.mousePosition), interactableLayer); + if (raycaster) { + // Debug.Log("raycasthit"); if (!selectingAll) { - Debug.Log("hit"); - raycastHit.collider.GetComponent().tobeSelected = true; - tobeSelectedInt.Add(raycastHit.collider.GetComponent()); + raycaster.GetComponent().tobeSelected = true; + if (!tobeSelectedInt.Contains(raycaster.GetComponent())) + { + tobeSelectedInt.Add(raycaster.GetComponent()); + } if (Input.GetMouseButtonDown(0)) { - raycastHit.collider.GetComponent().tobeSelected = false; - tobeSelectedInt.Remove(raycastHit.collider.GetComponent()); - raycastHit.collider.GetComponent().selected = true; - selectedInt.Add(raycastHit.collider.GetComponent()); + foreach (InteractBase i in selectedInt) + { + i.selected = false; + } + selectedInt.Clear(); + raycaster.GetComponent().tobeSelected = false; + tobeSelectedInt.Remove(raycaster.GetComponent()); + raycaster.GetComponent().selected = true; + if (!selectedInt.Contains(raycaster.GetComponent())) + { + selectedInt.Add(raycaster.GetComponent()); + } } } } @@ -43,7 +69,7 @@ void Update() } tobeSelectedInt.Clear(); - if (Input.GetMouseButtonDown(0)) + if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject()) { foreach (InteractBase i in selectedInt) { @@ -54,4 +80,54 @@ void Update() } } } + void UpdateInteractList() + { + if (selectedInt.Count > 0) + { + enabledInteract = new List(InteractControl.GetInstance().interactOptions[selectedInt[0].interactType]); + // Debug.Log(InteractControl.GetInstance().interactOptions[InteractControl.InteractType.Base].Count); + foreach (InteractBase interactBase in selectedInt) + { + foreach (InteractControl.InteractOption interactOption in enabledInteract) + if (!InteractControl.GetInstance().interactOptions[interactBase.interactType].Contains(interactOption)) + { + enabledInteract.Remove(interactOption); + } + } + + } + else + { + if (enabledInteract.Count > 0) + enabledInteract.Clear(); + } + } + void Interact() + { + foreach (InteractBase interactBase in selectedInt) + { + interactBase.interactOption = selectedOption; + } + selectedOption = InteractControl.InteractOption.None; + } + void ShipMpve() + { + if (Input.GetMouseButtonDown(1)) + { + foreach (InteractBase interactBase in selectedInt) + { + interactBase.moveOption = Camera.main.ScreenToWorldPoint(Input.mousePosition); + } + } + } + void ShipAttack() + { + if (Input.GetKeyDown(KeyCode.Space)) + { + foreach (InteractBase interactBase in selectedInt) + { + interactBase.attackOption = Camera.main.ScreenToWorldPoint(Input.mousePosition); + } + } + } } \ No newline at end of file diff --git a/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs b/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs new file mode 100644 index 00000000..8b622dd0 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ShipControl : MonoBehaviour +{ + Rigidbody2D rb; + public InteractBase interactBase; + [SerializeField] + float speed; + private float targetQ; + public MessageOfShip messageOfShip; + void SetVQTo(Vector2 targetV) + { + if ((rb.velocity.normalized - targetV.normalized).magnitude < 1.5f || rb.velocity.magnitude < 0.1f) + rb.velocity = Vector2.Lerp(rb.velocity, targetV, 0.1f); + else + rb.velocity = Vector2.Lerp(rb.velocity, Vector2.zero, 0.1f); + rb.rotation = Mathf.Lerp(rb.rotation, targetQ, 0.03f); + } + float DealQ(float qTar) + { + while (qTar - targetQ > 180) + qTar -= 360; + while (targetQ - qTar > 180) + qTar += 360; + return qTar; + } + // Start is called before the first frame update + void Start() + { + interactBase = GetComponent(); + rb = GetComponent(); + } + + // Update is called once per frame + void Update() + { + MoveTowards(interactBase.moveOption); + AttackTowards(interactBase.attackOption); + interactBase.attackOption = Vector2.zero; + } + void MoveTowards(Vector2 pos) + { + if ((pos - (Vector2)transform.position).magnitude > 0.1f) + { + targetQ = DealQ(Mathf.Atan2(pos.y - transform.position.y, pos.x - transform.position.x) * Mathf.Rad2Deg - 90); + SetVQTo((pos - (Vector2)transform.position).normalized * speed); + } + else + SetVQTo(Vector2.zero); + } + void AttackTowards(Vector2 pos) + { + if (pos != Vector2.zero) + { + GameObject obj; + switch (messageOfShip.weaponType) + { + case WeaponType.LASERGUN: + obj = ObjCreater.GetInstance().CreateObj(BulletType.LASER, transform.position, + Quaternion.AngleAxis(Vector2.SignedAngle(Vector2.up, pos - (Vector2)transform.position), Vector3.forward)); + obj.GetComponent().velocity = ParaDefine.GetInstance().laserData.speed * (pos - (Vector2)transform.position).normalized; + obj.GetComponent().messageOfBullet.playerTeam = messageOfShip.playerTeam; + break; + case WeaponType.PLASMAGUN: + obj = ObjCreater.GetInstance().CreateObj(BulletType.PLASMA, transform.position, + Quaternion.AngleAxis(Vector2.SignedAngle(Vector2.up, pos - (Vector2)transform.position), Vector3.forward)); + obj.GetComponent().velocity = ParaDefine.GetInstance().plasmaData.speed * (pos - (Vector2)transform.position).normalized; + obj.GetComponent().messageOfBullet.playerTeam = messageOfShip.playerTeam; + break; + case WeaponType.SHELLGUN: + obj = ObjCreater.GetInstance().CreateObj(BulletType.SHELL, transform.position, + Quaternion.AngleAxis(Vector2.SignedAngle(Vector2.up, pos - (Vector2)transform.position), Vector3.forward)); + obj.GetComponent().velocity = ParaDefine.GetInstance().shellData.speed * (pos - (Vector2)transform.position).normalized; + obj.GetComponent().messageOfBullet.playerTeam = messageOfShip.playerTeam; + break; + case WeaponType.MISSILEGUN: + obj = ObjCreater.GetInstance().CreateObj(BulletType.MISSILE, transform.position, + Quaternion.AngleAxis(Vector2.SignedAngle(Vector2.up, pos - (Vector2)transform.position), Vector3.forward)); + obj.GetComponent().velocity = ParaDefine.GetInstance().missileData.speed * (pos - (Vector2)transform.position).normalized; + obj.GetComponent().messageOfBullet.playerTeam = messageOfShip.playerTeam; + break; + case WeaponType.ARCGUN: + obj = ObjCreater.GetInstance().CreateObj(BulletType.ARC, transform.position, + Quaternion.AngleAxis(Vector2.SignedAngle(Vector2.up, pos - (Vector2)transform.position), Vector3.forward)); + obj.GetComponent().velocity = ParaDefine.GetInstance().arcData.speed * (pos - (Vector2)transform.position).normalized; + obj.GetComponent().messageOfBullet.playerTeam = messageOfShip.playerTeam; + break; + } + } + } +} diff --git a/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs.meta b/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs.meta new file mode 100644 index 00000000..626d5b0c --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Ship/ShipControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1d5ff6b6f4992b54b9765b7e0aa3fc02 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/Tool.cs b/interface/interface_local/Assets/Scripts/Tool.cs new file mode 100644 index 00000000..f7032bf7 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Tool.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Tool : Singleton +{ + System.Random a = new System.Random(); + public int GetRandom(int min, int max) + { + return a.Next(min, max); + } +} diff --git a/interface/interface_local/Assets/Scripts/Tool.cs.meta b/interface/interface_local/Assets/Scripts/Tool.cs.meta new file mode 100644 index 00000000..2972c9f9 --- /dev/null +++ b/interface/interface_local/Assets/Scripts/Tool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f1d14107d410cef4685915ba92844b95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/interface/interface_local/Assets/Scripts/UI/UIControl.cs b/interface/interface_local/Assets/Scripts/UI/UIControl.cs index 134639d4..31f7d0f9 100644 --- a/interface/interface_local/Assets/Scripts/UI/UIControl.cs +++ b/interface/interface_local/Assets/Scripts/UI/UIControl.cs @@ -19,8 +19,21 @@ void Update() { if (!Base) Base = GameObject.FindGameObjectWithTag("Base").GetComponent(); - healthText.text = "Health: " + Base.health.ToString(); - healthSlider.value = Base.health / 24000f; - ecoText.text = "Eco: " + Base.economy.ToString(); + healthText.text = "Health: " + Base.messageOfBase.hp.ToString(); + healthSlider.value = Base.messageOfBase.hp / 24000f; + ecoText.text = "Eco: " + Base.messageOfBase.economy.ToString(); + } + public void BuildCivilship() + { + Debug.Log("button pushed"); + PlayerControl.GetInstance().selectedOption = InteractControl.InteractOption.BuildCivil; + } + public void BuildMilitaryship() + { + PlayerControl.GetInstance().selectedOption = InteractControl.InteractOption.BuildMilitary; + } + public void BuildFlagship() + { + PlayerControl.GetInstance().selectedOption = InteractControl.InteractOption.BuildFlag; } } diff --git a/interface/interface_local/ProjectSettings/BurstAotSettings_WebGL.json b/interface/interface_local/ProjectSettings/BurstAotSettings_WebGL.json new file mode 100644 index 00000000..eed54c3f --- /dev/null +++ b/interface/interface_local/ProjectSettings/BurstAotSettings_WebGL.json @@ -0,0 +1,16 @@ +{ + "MonoBehaviour": { + "Version": 4, + "EnableBurstCompilation": true, + "EnableOptimisations": true, + "EnableSafetyChecks": false, + "EnableDebugInAllBuilds": false, + "DebugDataKind": 1, + "EnableArmv9SecurityFeatures": false, + "CpuMinTargetX32": 0, + "CpuMaxTargetX32": 0, + "CpuMinTargetX64": 0, + "CpuMaxTargetX64": 0, + "OptimizeFor": 0 + } +} diff --git a/interface/interface_local/ProjectSettings/CommonBurstAotSettings.json b/interface/interface_local/ProjectSettings/CommonBurstAotSettings.json new file mode 100644 index 00000000..0293dafc --- /dev/null +++ b/interface/interface_local/ProjectSettings/CommonBurstAotSettings.json @@ -0,0 +1,6 @@ +{ + "MonoBehaviour": { + "Version": 4, + "DisabledWarnings": "" + } +} diff --git a/interface/interface_local/ProjectSettings/ProjectSettings.asset b/interface/interface_local/ProjectSettings/ProjectSettings.asset index 51bbfccd..ce191a9b 100644 --- a/interface/interface_local/ProjectSettings/ProjectSettings.asset +++ b/interface/interface_local/ProjectSettings/ProjectSettings.asset @@ -170,7 +170,7 @@ PlayerSettings: AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: - stripEngineCode: 1 + stripEngineCode: 0 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 @@ -771,11 +771,11 @@ PlayerSettings: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 0 + webGLCompressionFormat: 2 webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 - webGLDecompressionFallback: 0 + webGLDecompressionFallback: 1 webGLInitialMemorySize: 32 webGLMaximumMemorySize: 2048 webGLMemoryGrowthMode: 2 diff --git a/interface/interface_local/ProjectSettings/TagManager.asset b/interface/interface_local/ProjectSettings/TagManager.asset index e61a6fa0..13cd3c34 100644 --- a/interface/interface_local/ProjectSettings/TagManager.asset +++ b/interface/interface_local/ProjectSettings/TagManager.asset @@ -39,6 +39,9 @@ TagManager: - - m_SortingLayers: + - name: BackGround + uniqueID: 3268033867 + locked: 0 - name: Default uniqueID: 0 locked: 0 diff --git a/interface/interface_local/ProjectSettings/UnityConnectSettings.asset b/interface/interface_local/ProjectSettings/UnityConnectSettings.asset index 4c136ae9..404161ff 100644 --- a/interface/interface_local/ProjectSettings/UnityConnectSettings.asset +++ b/interface/interface_local/ProjectSettings/UnityConnectSettings.asset @@ -4,7 +4,7 @@ UnityConnectSettings: m_ObjectHideFlags: 0 serializedVersion: 1 - m_Enabled: 0 + m_Enabled: 1 m_TestMode: 0 m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events m_EventUrl: https://cdp.cloud.unity3d.com/v1/events