Ver Fonte

召唤刺客

WGL há 2 meses atrás
pai
commit
1fae33dc3c

+ 22 - 301
ActionTowerDefense/Assets/Resources/Actions/Player.inputactions

@@ -95,78 +95,6 @@
                     "interactions": "Press(behavior=1)",
                     "initialStateCheck": false
                 },
-                {
-                    "name": "SummonSpirit",
-                    "type": "Button",
-                    "id": "227151c5-4c1f-41ed-acdc-7eee0733b71f",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpiritUp",
-                    "type": "Button",
-                    "id": "c1982c39-27d2-46da-aaf9-102e910a1a60",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "Press(behavior=1)",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit1",
-                    "type": "Button",
-                    "id": "dd87c436-a5dc-4c07-8395-94f57f7cfdfb",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit1Up",
-                    "type": "Button",
-                    "id": "6c6cf8f1-a3d6-4c6a-98b7-94071b054ba6",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "Press(behavior=1)",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit2",
-                    "type": "Button",
-                    "id": "f55a91e4-2d01-40d9-9059-8eced907b203",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit2Up",
-                    "type": "Button",
-                    "id": "6f30d832-389e-4de5-8c80-26299134fe6b",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "Press(behavior=1)",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit3",
-                    "type": "Button",
-                    "id": "5772fd08-ff74-40e9-8c3c-1df83722b15f",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "",
-                    "initialStateCheck": false
-                },
-                {
-                    "name": "SummonSpirit3Up",
-                    "type": "Button",
-                    "id": "94f0498d-8457-4c71-bd1a-5e3e24647e4c",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "Press(behavior=1)",
-                    "initialStateCheck": false
-                },
                 {
                     "name": "ChooseSpirit",
                     "type": "Button",
@@ -202,15 +130,6 @@
                     "processors": "",
                     "interactions": "",
                     "initialStateCheck": false
-                },
-                {
-                    "name": "TransfigurateUp",
-                    "type": "Button",
-                    "id": "ffb0c687-2961-4bda-b9f3-00bb3134dbce",
-                    "expectedControlType": "Button",
-                    "processors": "",
-                    "interactions": "",
-                    "initialStateCheck": false
                 }
             ],
             "bindings": [
@@ -412,94 +331,6 @@
                     "isComposite": false,
                     "isPartOfComposite": false
                 },
-                {
-                    "name": "",
-                    "id": "349ac227-416d-4645-801f-5ff0566a4abd",
-                    "path": "<Keyboard>/p",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "3ec905f6-83bc-4b30-b8dd-e99d86cf3af7",
-                    "path": "<Gamepad>/dpad/up",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "460166c5-e0bc-414e-b1df-2b3993b207a2",
-                    "path": "<Keyboard>/o",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit1",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "ffc9dba9-e98f-4e62-9542-dbc1c0491ca1",
-                    "path": "<Gamepad>/dpad/left",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit1",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "a35998e9-a5c9-4751-8e0c-6bb47fe2f4f9",
-                    "path": "<Keyboard>/i",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit2",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "d34aaa10-4045-42da-81a4-e818a3fa707a",
-                    "path": "<Gamepad>/dpad/down",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit2",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "34529d16-5c8d-4adf-ba55-b2115966f60c",
-                    "path": "<Keyboard>/u",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit3",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "d715c8b2-b4be-4850-99ae-46c3f5acbfeb",
-                    "path": "<Gamepad>/dpad/right",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit3",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
                 {
                     "name": "",
                     "id": "d9443439-0988-4bd5-b534-f3f2c2fcfb50",
@@ -566,94 +397,6 @@
                     "isComposite": false,
                     "isPartOfComposite": false
                 },
-                {
-                    "name": "",
-                    "id": "e8e33323-d398-47ac-939b-1d93df0c1f51",
-                    "path": "<Keyboard>/p",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpiritUp",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "9998d4b6-45b9-4a55-b272-dfa3f10d4b8f",
-                    "path": "<Gamepad>/dpad/up",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpiritUp",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "bfcdc0d5-7fda-4489-a001-11da61df09fe",
-                    "path": "<Keyboard>/o",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit1Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "0d90d3db-3bf7-4331-aa32-6af3d7732188",
-                    "path": "<Gamepad>/dpad/left",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit1Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "9d2b39a3-1797-4275-836d-862781e8aac2",
-                    "path": "<Keyboard>/i",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit2Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "c8f12ec5-fd3d-4380-aa5d-4ca61a4651c3",
-                    "path": "<Gamepad>/dpad/down",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit2Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "9d132458-e6c6-4ccb-8477-ddb142b305c2",
-                    "path": "<Keyboard>/u",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit3Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "d734fb3a-8711-4a0a-a012-95e31a92d034",
-                    "path": "<Gamepad>/dpad/right",
-                    "interactions": "",
-                    "processors": "",
-                    "groups": "",
-                    "action": "SummonSpirit3Up",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
                 {
                     "name": "",
                     "id": "e9dbde25-8702-4394-be80-f76cbf1ff7f9",
@@ -676,28 +419,6 @@
                     "isComposite": false,
                     "isPartOfComposite": false
                 },
-                {
-                    "name": "",
-                    "id": "13270574-5957-4f08-af0d-8345ea15a4ff",
-                    "path": "<Gamepad>/rightShoulder",
-                    "interactions": "Press",
-                    "processors": "",
-                    "groups": "",
-                    "action": "Transfigurate",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "a3e0384e-35ea-48e4-ba6c-cf12d025d802",
-                    "path": "<Keyboard>/enter",
-                    "interactions": "Press",
-                    "processors": "",
-                    "groups": "",
-                    "action": "Transfigurate",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
                 {
                     "name": "",
                     "id": "5a3d1ef4-05de-493a-a63f-354b723ae53f",
@@ -720,28 +441,6 @@
                     "isComposite": false,
                     "isPartOfComposite": false
                 },
-                {
-                    "name": "",
-                    "id": "bdf547a7-0a2a-4860-886d-82c203d47504",
-                    "path": "<Gamepad>/rightShoulder",
-                    "interactions": "Press(behavior=1)",
-                    "processors": "",
-                    "groups": "",
-                    "action": "TransfigurateUp",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
-                {
-                    "name": "",
-                    "id": "e9ea851d-e603-48ac-a6fe-3227b42b6ca4",
-                    "path": "<Keyboard>/enter",
-                    "interactions": "Press(behavior=1)",
-                    "processors": "",
-                    "groups": "",
-                    "action": "TransfigurateUp",
-                    "isComposite": false,
-                    "isPartOfComposite": false
-                },
                 {
                     "name": "",
                     "id": "10581194-1be2-428c-9212-b24dfe0d6c81",
@@ -807,6 +506,28 @@
                     "action": "ChooseSpirit_LR",
                     "isComposite": false,
                     "isPartOfComposite": true
+                },
+                {
+                    "name": "",
+                    "id": "13270574-5957-4f08-af0d-8345ea15a4ff",
+                    "path": "<Gamepad>/rightShoulder",
+                    "interactions": "Press",
+                    "processors": "",
+                    "groups": "",
+                    "action": "Transfigurate",
+                    "isComposite": false,
+                    "isPartOfComposite": false
+                },
+                {
+                    "name": "",
+                    "id": "a3e0384e-35ea-48e4-ba6c-cf12d025d802",
+                    "path": "<Keyboard>/enter",
+                    "interactions": "Press",
+                    "processors": "",
+                    "groups": "",
+                    "action": "Transfigurate",
+                    "isComposite": false,
+                    "isPartOfComposite": false
                 }
             ]
         }

+ 651 - 32
ActionTowerDefense/Assets/Resources/Prefab/MySoldier/Spirits_Assassin.prefab

@@ -102,6 +102,7 @@ Transform:
   - {fileID: 2437299196663985746}
   - {fileID: 5718990486604556333}
   - {fileID: 3277761006413294872}
+  - {fileID: 1658938184312316380}
   - {fileID: 2288379621507428556}
   m_Father: {fileID: 2730232521377132808}
   m_RootOrder: 1
@@ -235,6 +236,8 @@ GameObject:
   m_Component:
   - component: {fileID: 2437299196472462364}
   - component: {fileID: 2437299196472462355}
+  - component: {fileID: 5357347854477346124}
+  - component: {fileID: 1114664664003326227}
   m_Layer: 7
   m_Name: Spirits_Assassin
   m_TagString: Demonic
@@ -277,6 +280,432 @@ Rigidbody:
   m_Interpolate: 0
   m_Constraints: 120
   m_CollisionDetection: 1
+--- !u!114 &5357347854477346124
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2437299196472462361}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 650247f9c3a070a419cde11fb87b7afe, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  rb: {fileID: 2437299196472462355}
+  bodyTrans: {fileID: 2730232521377132808}
+  beSearchTrigger: {fileID: 1317309795988277421}
+  searchTrigger: {fileID: 5104552355235513707}
+  bodyCollider: {fileID: 8367450352918568419}
+  uiHp: {fileID: 6433555643392153575}
+  beHitTrigger: {fileID: 5333142802677931907}
+  attackController: {fileID: 1114664664003326227}
+  platform: {fileID: 0}
+  mecanim: {fileID: 5617185463097218335}
+  meshRenderer: {fileID: 0}
+  ani: {fileID: 6496896669866891404}
+  totalDieKeepTime: 0
+  totalAttack_summonTime: 1.3333334
+  totalAttack_marchTime: 0.9666667
+  showInjuryNum: 0
+  injuryNumText: {fileID: 0}
+  injuryNumTextSummon: {fileID: 0}
+  injuryNumPos_summon: {x: 0, y: 1}
+  injuryNumRandom_summon: {x: 1, y: 1}
+  injuryNumPos_march: {x: 0, y: 1}
+  injuryNumRandom_march: {x: 2, y: 2}
+  dieKeepTime: 0
+  beHitDistance: 0
+  attackDis: 0
+  targetCharacter: {fileID: 0}
+  attackTarget: {fileID: 0}
+  state: 0
+  totalHp: 100
+  hp: 0
+  canFly: 0
+  canControlFly: 0
+  nowCanFly: 0
+  canNotShotDown: 1
+  canNotAddForce: 0
+  canNotChangeHurt: 0
+  isDie: 0
+  isRevive: 0
+  invincibleTime: 0
+  isBeHitBySummonAttack: 0
+  statePre: {fileID: 0}
+  ls: {fileID: 0}
+  isInSoulTower: 0
+  beLarger: 0
+  toLargeSize: 0
+  cookEffect: {fileID: 0}
+  Attack_summonShootCanTransmit: 0
+  debugAttackFrom: 0
+  hitResistance: 0
+  foot: {fileID: 2437299196663985756}
+  attributeStatus: {fileID: 0}
+  hitFeedbackSystem: {fileID: 0}
+  spineEvent: {fileID: 0}
+  extraRiseGravity: -28.8
+  extraFallGravity: -14.4
+  extraGroundGravity: -28.8
+  velocityAddition: 0
+  platformPosY: 0
+  platformRotZ: 0
+  RotLerpSpeed: 0.6
+  RotLerpTime: 0
+  matState: 1
+  spinee: {fileID: 0}
+  mesh: {fileID: 0}
+  mats: []
+  outlineMats: []
+  outline1Mats: []
+  moveSpeed: 5
+  needToAdjustFlyHeight: 0
+  flyHeight: 0
+  maxFlyHeight: 0
+  minFlyHeight: 0
+  flyUpTime: 0
+  isAdjustHeight: 0
+  isDamageReduction: 0
+  reductionDegree: 0
+  reductionEffect: {fileID: 0}
+  effect: {fileID: 0}
+  soulPrefab: {fileID: 0}
+  soulStartSpeed: 1
+  isInvisible: 0
+  invisibleTime: 0
+  haveTransmit: 0
+  transmitTime: 0
+  portalsController: {fileID: 0}
+  isSustainedInjury: 0
+  sustainedInjuryTime: 0
+  sustainedInjury_IntervalTime: 0
+  sustainedInjury_damage: 0
+  heavyDamage: 0
+  killer: {fileID: 0}
+  searchState: 0
+  soldierType: 3
+  player: {fileID: 0}
+  playerID: 0
+  id: 0
+  costMp: 10
+  isBack: 0
+  baseSortingOrder: 0
+  runSpeed: 0
+  summonTime: 0
+  isReturnSoulTower: 0
+  origSoulPos: {x: 0, y: 0, z: 0}
+  isRecorded: 0
+  curAttackID: 0
+  adsorbSpeed: 0
+  adsorbTarget: {x: 0, y: 0, z: 0}
+  effectPrefab: {fileID: 0}
+  dropSoulMax: 3
+  dropSoulMin: 1
+  dropSoulAngle: 60
+  dashTrigger: {fileID: 2732519068839948188}
+  isDash: 0
+  dashAttackEffect: {fileID: 0}
+  offset: 0
+  dashEffect: {fileID: 0}
+  rushDistance: 15
+  targetDir: {x: -1, y: 0, z: 0}
+  rushSpeed: 30
+--- !u!114 &1114664664003326227
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2437299196472462361}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 565fb65a48a8ef648b3096d46e15efd9, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  attackKeys:
+  - aniName: attack_march
+    keys:
+    - attackMethod: 0
+      attackType: 0
+      startKeyName: attack_on
+      startKeyTime: 0.23333335
+      endType: 1
+      endKeyName: attack_off
+      endKeyTime: 0.5
+  - aniName: attack_summon
+    keys:
+    - attackMethod: 0
+      attackType: 0
+      startKeyName: attack_on
+      startKeyTime: 0
+      endType: 1
+      endKeyName: attack_off
+      endKeyTime: 0.33333334
+  keyTimes: []
+  attackTime: 0
+  attackKeyCount: 0
+  nextStartKeyTime: 0
+  nextEndKeyTime: 0
+  curKeyNum: 0
+  attackType: 0
+  attackInterval: 0
+  curDamage: 0
+  canHitFly: 1
+  attackInfo:
+    attackValue: 0
+    damage: 0
+    attackDir: {x: 0, y: 0, z: 0}
+    attackEffect: 
+    floatState:
+      time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
+      ControlOrder: 0
+    blowUp:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamageRate: 0
+      ControlOrder: 0
+    shotDown:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamage: 0
+      ControlOrder: 0
+    weak:
+      time: 0
+      ControlOrder: 0
+    armorPiercing:
+      rate: 0
+    vulnerable:
+      rate: 0
+      time: 0
+    stackingWounds:
+      damage: 0
+      time: 0
+    changeDamage:
+      rate: 0
+    sustainedInjury:
+      damage: 0
+    isDemSummon: 0
+  addAttackEffect: {fileID: 0}
+  skill: {fileID: 0}
+  attackDistance: 0
+  attackTrigger: {fileID: 2280520615464243483, guid: 3b6c8ff3bb6416c41952c448dc6aeb1d, type: 3}
+  isAttackTriggerOn: 0
+  bulletPrefab: {fileID: 0}
+  shootPos: []
+  shootTrack: 0
+  shootAlwaysTrack: 0
+  targetTypes: 040000000500000006000000
+  beTargetCharacter: []
+  attackMethod:
+  - id: 0
+    attackName: "\u51B2\u523A"
+    attackType: 0
+    attackInfo:
+      attackValue: 0
+      damage: 0
+      attackDir: {x: 0, y: 0, z: 0}
+      attackEffect: 
+      floatState:
+        time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
+        ControlOrder: 0
+      blowUp:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamageRate: 0
+        ControlOrder: 0
+      shotDown:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamage: 0
+        ControlOrder: 0
+      weak:
+        time: 0
+        ControlOrder: 0
+      armorPiercing:
+        rate: 0
+      vulnerable:
+        rate: 0
+        time: 0
+      stackingWounds:
+        damage: 0
+        time: 0
+      changeDamage:
+        rate: 0
+      sustainedInjury:
+        damage: 0
+      isDemSummon: 0
+    attackTrigger: {fileID: 2732519068839948188}
+    attackDistance: 1
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
+    searchMode: 0
+    targetTypes: 010000000300000002000000
+    canHitFly: 1
+    armorPiercing: 0
+    bulletPrefab: {fileID: 0}
+    shootPos: []
+    maxUpAngle: 0
+    maxDownAngle: 0
+    shootTrack: 0
+    shootAlwaysTrack: 0
+    skill: {fileID: 0}
+  - id: 1
+    attackName: "\u666E\u653B"
+    attackType: 0
+    attackInfo:
+      attackValue: 0
+      damage: 10
+      attackDir: {x: 0, y: 0, z: 0}
+      attackEffect: 
+      floatState:
+        time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
+        ControlOrder: 0
+      blowUp:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamageRate: 0
+        ControlOrder: 0
+      shotDown:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamage: 0
+        ControlOrder: 0
+      weak:
+        time: 0
+        ControlOrder: 0
+      armorPiercing:
+        rate: 0
+      vulnerable:
+        rate: 0
+        time: 0
+      stackingWounds:
+        damage: 0
+        time: 0
+      changeDamage:
+        rate: 0
+      sustainedInjury:
+        damage: 0
+      isDemSummon: 0
+    attackTrigger: {fileID: 4347565098670608659}
+    attackDistance: 1
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
+    searchMode: 0
+    targetTypes: 010000000300000002000000
+    canHitFly: 1
+    armorPiercing: 0
+    bulletPrefab: {fileID: 0}
+    shootPos: []
+    maxUpAngle: 0
+    maxDownAngle: 0
+    shootTrack: 0
+    shootAlwaysTrack: 0
+    skill: {fileID: 0}
+  curAttackMethod:
+    id: 0
+    attackName: 
+    attackType: 0
+    attackInfo:
+      attackValue: 0
+      damage: 0
+      attackDir: {x: 0, y: 0, z: 0}
+      attackEffect: 
+      floatState:
+        time: 0
+        upTime: {x: 0, y: 0}
+        backSpeed: {x: 0, y: 0}
+        rotateSpeed: {x: 0, y: 0}
+        height: {x: 0, y: 0}
+        ControlOrder: 0
+      blowUp:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamageRate: 0
+        ControlOrder: 0
+      shotDown:
+        directionType: 0
+        dir: {x: 0, y: 0, z: 0}
+        dirRandom: {x: 0, y: 0, z: 0}
+        force: 0
+        time: 0
+        haveLandingDamage: 0
+        landingDamage: 0
+        ControlOrder: 0
+      weak:
+        time: 0
+        ControlOrder: 0
+      armorPiercing:
+        rate: 0
+      vulnerable:
+        rate: 0
+        time: 0
+      stackingWounds:
+        damage: 0
+        time: 0
+      changeDamage:
+        rate: 0
+      sustainedInjury:
+        damage: 0
+      isDemSummon: 0
+    attackTrigger: {fileID: 0}
+    attackDistance: 0
+    maxAttackDis: 0
+    minAttackDis: 0
+    needToChange: 0
+    searchMode: 0
+    targetTypes: 
+    canHitFly: 0
+    armorPiercing: 0
+    bulletPrefab: {fileID: 0}
+    shootPos: []
+    maxUpAngle: 0
+    maxDownAngle: 0
+    shootTrack: 0
+    shootAlwaysTrack: 0
+    skill: {fileID: 0}
 --- !u!1 &2437299196663985757
 GameObject:
   m_ObjectHideFlags: 0
@@ -321,8 +750,8 @@ BoxCollider:
   m_IsTrigger: 1
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2, y: 2, z: 2}
-  m_Center: {x: -0.035, y: 0, z: 0}
+  m_Size: {x: 0.5, y: 0.5, z: 2}
+  m_Center: {x: 0, y: 0, z: 0}
 --- !u!114 &2437299196663985756
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -488,7 +917,6 @@ Transform:
   m_Children:
   - {fileID: 1971427318739414964}
   - {fileID: 7794457276998281569}
-  - {fileID: 1658938184312316380}
   m_Father: {fileID: 2437299196472462364}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -872,7 +1300,7 @@ Animator:
   m_GameObject: {fileID: 7669620205589286043}
   m_Enabled: 1
   m_Avatar: {fileID: 0}
-  m_Controller: {fileID: 9100000, guid: aed5d22e60189a64ab3e41d15a68829d, type: 2}
+  m_Controller: {fileID: 9100000, guid: f9202bebd93e9294bafe2039a427e1f2, type: 2}
   m_CullingMode: 0
   m_UpdateMode: 0
   m_ApplyRootMotion: 0
@@ -936,15 +1364,14 @@ GameObject:
   m_Component:
   - component: {fileID: 1658938184312316380}
   - component: {fileID: 4979172509264116742}
-  - component: {fileID: 5670168015807601097}
-  - component: {fileID: 8257178686841521685}
+  - component: {fileID: 2732519068839948188}
   m_Layer: 20
   m_Name: DashAttackTrigger
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &1658938184312316380
 Transform:
   m_ObjectHideFlags: 0
@@ -957,8 +1384,8 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 1
   m_Children: []
-  m_Father: {fileID: 2730232521377132808}
-  m_RootOrder: 2
+  m_Father: {fileID: 7794457276998281569}
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &4979172509264116742
 BoxCollider:
@@ -973,7 +1400,7 @@ BoxCollider:
   serializedVersion: 2
   m_Size: {x: 2.8370209, y: 2, z: 20}
   m_Center: {x: -0.6614895, y: 0.8299999, z: 0}
---- !u!114 &5670168015807601097
+--- !u!114 &2732519068839948188
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -982,25 +1409,68 @@ MonoBehaviour:
   m_GameObject: {fileID: 8175746555017464802}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 028d37216b47ca446ba0037910919e25, type: 3}
+  m_Script: {fileID: 11500000, guid: 5eaed0a6b9d6fc6409bef80cf41a0a8e, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
---- !u!54 &8257178686841521685
-Rigidbody:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 8175746555017464802}
-  serializedVersion: 2
-  m_Mass: 1
-  m_Drag: 0
-  m_AngularDrag: 0.05
-  m_UseGravity: 0
-  m_IsKinematic: 0
-  m_Interpolate: 0
-  m_Constraints: 126
-  m_CollisionDetection: 0
+  canBreakWall: 0
+  wallBrealNum: 10
+  isShoot: 0
+  type: 0
+  owner: {fileID: 0}
+  isSingleAttack: 0
+  cantSingleAttack: 0
+  trigedObjs: []
+  attackInfo:
+    attackValue: 0
+    damage: 0
+    attackDir: {x: 0, y: 0, z: 0}
+    attackEffect: 
+    floatState:
+      time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
+      ControlOrder: 0
+    blowUp:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamageRate: 0
+      ControlOrder: 0
+    shotDown:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamage: 0
+      ControlOrder: 0
+    weak:
+      time: 0
+      ControlOrder: 0
+    armorPiercing:
+      rate: 0
+    vulnerable:
+      rate: 0
+      time: 0
+    stackingWounds:
+      damage: 0
+      time: 0
+    changeDamage:
+      rate: 0
+    sustainedInjury:
+      damage: 0
+    isDemSummon: 0
+  force: {x: 0, y: 0, z: 0}
+  changeHurt: 0
+  repelValue: 0
+  offsetY: 1
+  hitRate: 1
 --- !u!1 &8203964573996106666
 GameObject:
   m_ObjectHideFlags: 0
@@ -1019,7 +1489,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &8507731236713456294
 RectTransform:
   m_ObjectHideFlags: 0
@@ -1101,7 +1571,7 @@ MonoBehaviour:
   m_BlockingObjects: 0
   m_BlockingMask:
     serializedVersion: 2
-    m_Bits: 4294967295
+    m_Bits: 16777215
 --- !u!1 &8367450352918568419
 GameObject:
   m_ObjectHideFlags: 0
@@ -1145,8 +1615,8 @@ BoxCollider:
   m_IsTrigger: 0
   m_Enabled: 1
   serializedVersion: 2
-  m_Size: {x: 2, y: 2, z: 2}
-  m_Center: {x: 0.09, y: 0.91, z: 0}
+  m_Size: {x: 2, y: 1.9012223, z: 2}
+  m_Center: {x: 0.09000003, y: 0.9593889, z: 0}
 --- !u!1 &8769150919382874379
 GameObject:
   m_ObjectHideFlags: 0
@@ -1158,6 +1628,8 @@ GameObject:
   - component: {fileID: 2288379621507428556}
   - component: {fileID: 6353082427811530657}
   - component: {fileID: 5333142802677931907}
+  - component: {fileID: 6427036624503843430}
+  - component: {fileID: 2378416768658064159}
   m_Layer: 19
   m_Name: BeHitTrigger
   m_TagString: Untagged
@@ -1178,7 +1650,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 7794457276998281569}
-  m_RootOrder: 4
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!65 &6353082427811530657
 BoxCollider:
@@ -1208,6 +1680,153 @@ MonoBehaviour:
   owner: {fileID: 0}
   attackerID: 0
   curX: 0
+  mats: []
+--- !u!114 &6427036624503843430
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8769150919382874379}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 1d04dd6e35d71724689001e450625c39, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  curSpecialStates: -1
+  attackInfo:
+    attackValue: 0
+    damage: 0
+    attackDir: {x: 0, y: 0, z: 0}
+    attackEffect: 
+    floatState:
+      time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
+      ControlOrder: 0
+    blowUp:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamageRate: 0
+      ControlOrder: 0
+    shotDown:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamage: 0
+      ControlOrder: 0
+    weak:
+      time: 0
+      ControlOrder: 0
+    armorPiercing:
+      rate: 0
+    vulnerable:
+      rate: 0
+      time: 0
+    stackingWounds:
+      damage: 0
+      time: 0
+    changeDamage:
+      rate: 0
+    sustainedInjury:
+      damage: 0
+    isDemSummon: 0
+  attributeTime: 0
+  floatingState: 0
+  hitState: 0
+  isFly: 0
+  decelerationRatioX: 2
+  decelerationRatioY: 15
+  startFlyAngle: 15
+  flyingRotateSpeedRange: {x: 15, y: 45}
+  compressionDegree: 0.8
+  compressionSpeed: {x: 0.2, y: 0.4}
+  jumpVel: 5
+  haveVulnerable: 0
+  vulnerableTime: 0
+  stackingWoudsTime: 0
+  stackingWordsNum: 0
+  resistances:
+    controlOrder: 0
+    Float: 0
+    BlowUp: 0
+    ShotDown: 0
+    Weak: 0
+    armor: 0
+--- !u!114 &2378416768658064159
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8769150919382874379}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 38dc6c579f75e924697fbe3639d11c9f, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  freezeFrame: 0
+  isFreeze: 0
+  canFreeze: 0
+  curCharacterState: 0
+  attackInfoData:
+    attackValue: 0
+    damage: 0
+    attackDir: {x: 0, y: 0, z: 0}
+    attackEffect: 
+    floatState:
+      time: 0
+      upTime: {x: 0, y: 0}
+      backSpeed: {x: 0, y: 0}
+      rotateSpeed: {x: 0, y: 0}
+      height: {x: 0, y: 0}
+      ControlOrder: 0
+    blowUp:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamageRate: 0
+      ControlOrder: 0
+    shotDown:
+      directionType: 0
+      dir: {x: 0, y: 0, z: 0}
+      dirRandom: {x: 0, y: 0, z: 0}
+      force: 0
+      time: 0
+      haveLandingDamage: 0
+      landingDamage: 0
+      ControlOrder: 0
+    weak:
+      time: 0
+      ControlOrder: 0
+    armorPiercing:
+      rate: 0
+    vulnerable:
+      rate: 0
+      time: 0
+    stackingWounds:
+      damage: 0
+      time: 0
+    changeDamage:
+      rate: 0
+    sustainedInjury:
+      damage: 0
+    isDemSummon: 0
+  attackFromData: {fileID: 0}
+  hitStunTime: 0
+  canHitStun: 0
 --- !u!1 &8802879426389446295
 GameObject:
   m_ObjectHideFlags: 0

+ 6 - 14
ActionTowerDefense/Assets/Resources/Prefab/Player.prefab

@@ -5813,10 +5813,6 @@ MonoBehaviour:
   - {fileID: 8639832132491289359, guid: 4c2987691cdb47040b3a55ff928803c3, type: 3}
   - {fileID: 5440846222648032759, guid: 05825e721b2832f478f66e78daed901f, type: 3}
   - {fileID: 2437299196472462361, guid: a429663f5ce3055459229a7eddc06c58, type: 3}
-  - {fileID: 8639832132491289359, guid: 44821b04b647bf84eb8b3ff69cf72c27, type: 3}
-  - {fileID: 2437299196472462361, guid: 097d9d3ad9d15304f84fa472858a40aa, type: 3}
-  - {fileID: 5440846222648032759, guid: f386ed3093f5a02469dfbae37ca9160b, type: 3}
-  - {fileID: 2437299196472462361, guid: ccc9fcd0c0c762340885f199c1a9d44e, type: 3}
   demonicSummonPos:
   - {x: -1, y: 0, z: 0}
   - {x: -1, y: 0, z: 0}
@@ -5824,7 +5820,6 @@ MonoBehaviour:
   - {x: -1, y: 0, z: 0}
   - {x: -1, y: 0, z: 0}
   - {x: -1, y: 0, z: 0}
-  - {x: -1, y: 0, z: 0}
   addSummonInvincibleTime: 0.1
   attackState: 0
   attackMoveSpeed: 5
@@ -5864,11 +5859,7 @@ MonoBehaviour:
   isBtnWestUp: 0
   isClickBtnNorth: 0
   isBtnNorthUp: 0
-  isSpiritSummon: 0
-  isSpiritSummon1: 0
-  isSpiritSummon2: 0
-  isSpiritSummon3: 0
-  isKeepBtnNorth: 0
+  isClickBtnTrans: 0
   LBisHold: 0
 --- !u!54 &3571941038519084339
 Rigidbody:
@@ -5928,13 +5919,14 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 01b7616677d36984185e7836d04c5b0b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  types: 4
   hasSpirits: 0
   nowSpirit: 0
-  maxCards: 3
+  maxCards: 9
   ownSpirits: ffffffffffffffffffffffff
   ultimateTimes: 000000000000000000000000
-  hps: 000000000000000000000000
+  summonCost: 3
+  spiritsPrefabs:
+  - {fileID: 2437299196472462361, guid: 097d9d3ad9d15304f84fa472858a40aa, type: 3}
 --- !u!114 &3896813473903261645
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -6399,7 +6391,6 @@ MeshRenderer:
   m_Materials:
   - {fileID: 2100000, guid: 1b17f7962e0b9be49bb10e99c6bd95a6, type: 2}
   - {fileID: 2100000, guid: 0c319badfe2307a48b8810d891649565, type: 2}
-  - {fileID: 2100000, guid: 1b17f7962e0b9be49bb10e99c6bd95a6, type: 2}
   - {fileID: 2100000, guid: 8f08601a75fbb72488593cad9f89acca, type: 2}
   - {fileID: 2100000, guid: 0c319badfe2307a48b8810d891649565, type: 2}
   m_StaticBatchInfo:
@@ -6550,6 +6541,7 @@ MonoBehaviour:
   owner: {fileID: 0}
   attackerID: 0
   curX: 0
+  mats: []
 --- !u!114 &7887786694786314154
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 2 - 4
ActionTowerDefense/Assets/Resources/Prefab/soul_purple.prefab

@@ -9844,11 +9844,9 @@ MonoBehaviour:
   to: {x: 0, y: 0, z: 0}
   time: 0
   Spirits_Invisible_NotFind: 0
-  haveTransmit: 0
-  transmitTime: 0
-  portalsController: {fileID: 0}
+  getSoulEffect: {fileID: 417478504669294145, guid: 040c2fee7f3561d409cbadff09028f6d, type: 3}
   isSourPurple: 1
-  type: 0
+  type: -1
   spiritSystem: {fileID: 0}
 --- !u!54 &1723151111827507801
 Rigidbody:

+ 1 - 1
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -727,7 +727,7 @@ public class Demonic : MoveCharacter
         }
     }
 
-    public void Attack_summon()
+    public virtual void Attack_summon()
     {
         if (needToAdjustFlyHeight && canFly)
         {

+ 40 - 273
ActionTowerDefense/Assets/Scripts/Characters/PlayerController.cs

@@ -264,56 +264,15 @@ public class PlayerController : MoveCharacter
     }
     [HideInInspector]
     public bool isBtnNorthUp;
-    public bool btnSpiritSummon
+    public bool btnTransClick
     {
         get
         {
-            //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
-            return isSpiritSummon;
+            return isClickBtnTrans;
         }
     }
     [HideInInspector]
-    public bool isSpiritSummon;
-    public bool btnSpiritSummon1
-    {
-        get
-        {
-            //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
-            return isSpiritSummon1;
-        }
-    }
-    [HideInInspector]
-    public bool isSpiritSummon1;
-    public bool btnSpiritSummon2
-    {
-        get
-        {
-            //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
-            return isSpiritSummon2;
-        }
-    }
-    [HideInInspector]
-    public bool isSpiritSummon2;
-    public bool btnSpiritSummon3
-    {
-        get
-        {
-            //return Input.GetKeyDown(KeyCode.I) || isClickBtnNorth;
-            return isSpiritSummon3;
-        }
-    }
-    [HideInInspector]
-    public bool isSpiritSummon3;
-    public bool btnNorthKeep
-    {
-        get
-        {
-            //return Input.GetKey(KeyCode.I) || isKeepBtnNorth;
-            return isKeepBtnNorth;
-        }
-    }
-    [HideInInspector]
-    public bool isKeepBtnNorth;
+    public bool isClickBtnTrans;
 
     public override void Init()
     {
@@ -514,6 +473,11 @@ public class PlayerController : MoveCharacter
         }
     }
 
+    void OnTransfigurate()
+    {
+        isClickBtnTrans = true;
+    }
+
     public void Jump()
     {
         SetUpSpeed(jumpSpeed);
@@ -554,7 +518,7 @@ public class PlayerController : MoveCharacter
             return false;
 
         }
-        if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
+        if (btnEastUp || btnWestUp || btnSouthUp || btnTransClick)
         {
             if (cacheSummonTime >= 0 && conductTime <= totalCacheSummonTime)
             {
@@ -926,26 +890,11 @@ public class PlayerController : MoveCharacter
             cacheSummonTime = totalCacheSummonTime;
             cacheSummonId = 2;
         }
-        //if (btnSpiritSummon)
-        //{
-        //    cacheSummonTime = totalCacheSummonTime;
-        //    cacheSummonId = 3;
-        //}
-        //if (btnSpiritSummon1)
-        //{
-        //    cacheSummonTime = totalCacheSummonTime;
-        //    cacheSummonId = 4;
-        //}
-        //if (btnSpiritSummon2)
-        //{
-        //    cacheSummonTime = totalCacheSummonTime;
-        //    cacheSummonId = 5;
-        //}
-        //if (btnSpiritSummon3)
-        //{
-        //    cacheSummonTime = totalCacheSummonTime;
-        //    cacheSummonId = 6;
-        //}
+        if (btnTransClick)
+        {
+            cacheSummonTime = totalCacheSummonTime;
+            cacheSummonId = spirits.nowSpirit + 3;
+        }
     }
 
     public override void OnState()
@@ -1120,174 +1069,6 @@ public class PlayerController : MoveCharacter
                 }
                 rb.velocity = velocity;
                 break;
-            case CharacterState.Attack:
-                if (attackController.attackTime <= 0)
-                {
-                    if (btnNorthKeep)
-                    {
-                        ChangeState(CharacterState.KeepAttack);
-                        break;
-                    }
-                    if (CheckPlayerChangeState(CharacterState.Attack))
-                    {
-                        break;
-                    }
-                }
-                break;
-            case CharacterState.KeepAttack:
-                if ((btnRushPress) && mp >= rushCostMp)
-                {
-                    ChangeState(CharacterState.Rush);
-                    break;
-                }
-                if (btnJumpPress && canJumpTime > 0)
-                {
-                    AirJump();
-                    break;
-                }
-                if (!btnNorthKeep)
-                {
-                    if (CheckPlayerChangeState(CharacterState.KeepAttack))
-                    {
-                        break;
-                    }
-                }
-                switch (attackState)
-                {
-                    case PlayerAttackState.Idle:
-                        if (bodyTrans.localScale.x > 0)
-                        {
-                            if (leftDir.x > 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkBack);
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x < -0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkForward);
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                        }
-                        else
-                        {
-                            if (leftDir.x > 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkForward);
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x < -0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkBack);
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                        }
-                        velocity.x = 0;
-                        rb.velocity = velocity;
-                        break;
-                    case PlayerAttackState.WalkForward:
-                        if (bodyTrans.localScale.x > 0)
-                        {
-                            if (leftDir.x > 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkBack);
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x > -0.3f && leftDir.x < 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.Idle);
-                                velocity.x = 0;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else
-                            {
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                            }
-                        }
-                        else
-                        {
-                            if (leftDir.x < -0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkBack);
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x > -0.3f && leftDir.x < 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.Idle);
-                                velocity.x = 0;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else
-                            {
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                            }
-                        }
-                        break;
-                    case PlayerAttackState.WalkBack:
-                        if (bodyTrans.localScale.x > 0)
-                        {
-                            if (leftDir.x < -0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkForward);
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x > -0.3f && leftDir.x < 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.Idle);
-                                velocity.x = 0;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else
-                            {
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                            }
-                        }
-                        else
-                        {
-                            if (leftDir.x > 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.WalkForward);
-                                velocity.x = attackMoveSpeed;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else if (leftDir.x > -0.3f && leftDir.x > 0.3f)
-                            {
-                                SetAttackState(PlayerAttackState.Idle);
-                                velocity.x = 0;
-                                rb.velocity = velocity;
-                                break;
-                            }
-                            else
-                            {
-                                velocity.x = -attackMoveSpeed;
-                                rb.velocity = velocity;
-                            }
-                        }
-                        break;
-                    default:
-                        break;
-                }
-                break;
             case CharacterState.Summon:
                 if (leftDir.x > 0.3f || leftDir.x < -0.3f)
                 {
@@ -1387,14 +1168,11 @@ public class PlayerController : MoveCharacter
         isClickBtnEast = false;
         isClickBtnNorth = false;
         isClickBtnWest = false;
+        isClickBtnTrans = false;
         isBtnSouthUp = false;
         isBtnEastUp = false;
         isBtnNorthUp = false;
         isBtnWestUp = false;
-        isSpiritSummon = false;
-        isSpiritSummon1 = false;
-        isSpiritSummon2 = false;
-        isSpiritSummon3 = false;
 
         if (foot.TrigGround)
         {
@@ -1723,23 +1501,8 @@ public class PlayerController : MoveCharacter
 
     public void Summon(int id)
     {
-        if (id >= demonicPrefabs.Count)
-        {
-            Debug.LogError("未配置" + id + "号使魔");
-            return;
-        }
-        if (id >= demonicSummonPos.Count)
-        {
-            Debug.LogError("未配置" + id + "号使魔召唤位置");
-            return;
-        }
         GameObject prefab;
         prefab = demonicPrefabs[id];
-
-        if (!CheckCanSummon(id))
-        {
-            return;
-        }
         ChangeState(CharacterState.Summon);
         summonTime = totalSummonTime;
         Demonic dem = prefab.GetComponent<Demonic>();
@@ -1798,14 +1561,11 @@ public class PlayerController : MoveCharacter
         demonic.Init();
         int order = prefab.GetComponent<Demonic>().baseSortingOrder + demonicDic[demonic.id].Count;
         demonic.SetSortingOrder(order);
-        if (id != 4)
-        {
-            demonic.Attack_summon();
-        }
+        demonic.Attack_summon();
         //id 3~6 为四个英灵
-        if (id >= 3 && id <= 6)
+        if (id >= 3)
         {
-            spirits.ultimateTimes[spirits.nowSpirit] -= 1;
+            spirits.ultimateTimes[id - 3] -= spirits.summonCost;
         }
         spiritSystem.RefreshPlayerUI();
         if (isInSoulTower)
@@ -1835,27 +1595,34 @@ public class PlayerController : MoveCharacter
 
     public bool CheckCanSummon(int id)
     {
-        GameObject prefab;
-        prefab = demonicPrefabs[id];
-
-        Demonic dem = prefab.GetComponent<Demonic>();
-        float costMp = dem.costMp;
-        for (int i = 0; i < 3; i++)
+        if(id < 3) //使魔
         {
-            if (GameManager.curSoldiers[i] == dem.soldierType)
+            GameObject prefab;
+            prefab = demonicPrefabs[id];
+
+            Demonic dem = prefab.GetComponent<Demonic>();
+            float costMp = dem.costMp;
+            for (int i = 0; i < 3; i++)
             {
-                costMp += slr.seb[i].mp;
-                break;
+                if (GameManager.curSoldiers[i] == dem.soldierType)
+                {
+                    costMp += slr.seb[i].mp;
+                    break;
+                }
             }
-        }
-        if (id < 3)
-        {
             costMp += addCostMp[id] * demonicDic[id].Count;
+            if (mp < costMp)
+            {
+                Debug.Log("mp不足召唤失败, 还得加个动画或者音效啥的");
+                return false;
+            }
         }
-        if (mp < costMp)
+        else
         {
-            Debug.Log("mp不足召唤失败, 还得加个动画或者音效啥的");
-            return false;
+            if(spirits.ultimateTimes[id -3 ] < spirits.summonCost)
+            {
+                return false;
+            }
         }
         return true;
     }

+ 0 - 6
ActionTowerDefense/Assets/Scripts/Characters/SearchTrigger.cs

@@ -101,12 +101,6 @@ public class SearchTrigger : MonoBehaviour
 
             if (HasTargetType(otherTargetType) && trigCharacterDic.ContainsKey(otherTargetType))
             {
-                if (enemy_Leafghost != null && playerController != null)
-                {
-                    Debug.Log(other.name);
-                    Debug.Log(other.transform.parent.parent.parent.name);
-                    Debug.Log(otherTargetType);
-                }
                 trigCharacterDic[otherTargetType].Add(trigger);
             }
         }

+ 4 - 3
ActionTowerDefense/Assets/Scripts/GameManager.cs

@@ -9,9 +9,10 @@ using Sirenix.OdinInspector;
 
 public enum SoldierType
 {
-    sword = 0,
-    shield = 1,
-    spear = 2,
+    [LabelText("·É½£")] sword = 0,
+    [LabelText("ÅÖ×Ó")] shield = 1,
+    [LabelText("ÁÖ³å")] spear = 2,
+    [LabelText("ÒõÁé")] Spirits = 3,
 }
 
 public class GameManager : MonoBehaviour

+ 2 - 53
ActionTowerDefense/Assets/Scripts/Spirits/Base_Spirits/SpiritSystem.cs

@@ -87,7 +87,6 @@ public class SpiritSystem : MonoBehaviour
 
     //Íæ¼ÒµÄspirits×é¼þ
     private PlayerController pc1;
-    private PlayerController pc2;
 
 
     private void Start()
@@ -103,7 +102,7 @@ public class SpiritSystem : MonoBehaviour
         switch (id)
         {
             case 0:
-                if (p1Spirits == null)
+                if (pc1 == null)
                 {
                     pc1 = PlayersInput.instance[0];
                     p1Spirits = pc1.GetComponent<Spirits>();
@@ -124,34 +123,7 @@ public class SpiritSystem : MonoBehaviour
                                 p1Spirits.ownSpirits[j] = spirit;
                                 p1Spirits.ultimateTimes[j] = 1;
                                 p1Spirits.hasSpirits += 1;
-                                break;
-                            }
-                        }
-                    }
-                }
-                break;
-            case 1:
-                if (p2Spirits == null)
-                {
-                    pc2 = PlayersInput.instance[1];
-                    p2Spirits = pc2.GetComponent<Spirits>();
-                }
-                for (int i = 0; i < 3; i++)
-                {
-                    if (p2Spirits.ownSpirits[i] == spirit)
-                    {
-                        p2Spirits.ultimateTimes[i] += 1;
-                        break;
-                    }
-                    if (i == 2)
-                    {
-                        for (int j = 0; j < 3; j++)
-                        {
-                            if (p2Spirits.ultimateTimes[j] == 0)
-                            {
-                                p2Spirits.ownSpirits[j] = spirit;
-                                p2Spirits.ultimateTimes[j] = 1;
-                                p2Spirits.hasSpirits += 1;
+                                pc1.demonicPrefabs.Add(p1Spirits.spiritsPrefabs[(int)spirit]);
                                 break;
                             }
                         }
@@ -350,13 +322,8 @@ public class SpiritSystem : MonoBehaviour
     public void RefreshPlayerUI()
     {
         p1Spirits.hasSpirits = 0;
-        if(p2Spirits != null)
-        {
-            p2Spirits.hasSpirits = 0;
-        }
         for(int i = 0; i < 3; i++)
         {
-
             if(p1Spirits.ultimateTimes[i] > 0)
             {
                 if (!P1nums[i].gameObject.activeSelf)
@@ -364,32 +331,14 @@ public class SpiritSystem : MonoBehaviour
                     P1nums[i].gameObject.SetActive(true);
                 }
                 P1nums[i].text = p1Spirits.ultimateTimes[i].ToString();
-                if (p2Spirits != null)
-                {
-                    if (!P2nums[i].gameObject.activeSelf)
-                    {
-                        P2nums[i].gameObject.SetActive(true);
-                    }
-                    P2nums[i].text = p2Spirits.ultimateTimes[i].ToString();
-                    p2Spirits.hasSpirits += 1;
-                }
                 p1Spirits.hasSpirits += 1;
             }
             else
             {
                 P1nums[i].gameObject.SetActive(false);
                 p1Spirits.ownSpirits[i] = Spirits.SpiritType.None;
-                P2nums[i].gameObject.SetActive(false);
-                if (p2Spirits != null)
-                {
-                    p2Spirits.ownSpirits[i] = Spirits.SpiritType.None;
-                }
             }
             player1cards[i].GetComponent<Image>().sprite = SpiritTypeToSprite(p1Spirits.ownSpirits[i]);
-            if(p2Spirits != null)
-            {
-                player2cards[i].GetComponent<Image>().sprite = SpiritTypeToSprite(p2Spirits.ownSpirits[i]);
-            }
         }
     }
 

+ 6 - 7
ActionTowerDefense/Assets/Scripts/Spirits/Base_Spirits/Spirits.cs

@@ -6,19 +6,18 @@ public class Spirits : MonoBehaviour
     public enum SpiritType          //英灵种类
     {
         None = -1,
-        Float = 0,                  //漂浮
-        [LabelText("刺客")] Assassin,
-        Cook = 2,                   //厨师
-        Invisible = 3,              //隐身
+        [LabelText("刺客")] Assassin = 0,
+        Float,                  //漂浮
+        Cook,                   //厨师
+        Invisible,              //隐身
     }
 
-    public int types;               //英灵数量
-
     public int hasSpirits;          //已有的英灵牌种类
     public int nowSpirit;           //选中的英灵
     public int maxCards;            //最多有多少张英灵牌
     public SpiritType[] ownSpirits; //已有的英灵牌
     public int[] ultimateTimes;     //英灵可使用的技能次数
-    public int[] hps;
+    [LabelText("召唤消耗次数")] public int summonCost;
+    public GameObject[] spiritsPrefabs;
 
 }

+ 2 - 12
ActionTowerDefense/Assets/Scripts/Spirits/ESpirits_Assassin.cs

@@ -72,8 +72,8 @@ public class ESpirits_Assassin : Enemy
                         {
                             if(Vector3.Distance(playerController.transform.position, transform.position) < readyDistance)
                             {
+                                ChangeState(CharacterState.Attack);
                                 eSpiritsState = ESpiritsState.Ready;
-                                state = CharacterState.Attack;
                                 rb.velocity = Vector3.zero;
                                 hitResistance = 100;
                                 attributeStatus.resistances.controlOrder = 1;
@@ -187,7 +187,7 @@ public class ESpirits_Assassin : Enemy
                             time = 0;
                             hitResistance = oldHitResistance;
                             attributeStatus.resistances.controlOrder = 0;
-                            state = CharacterState.Idle;
+                            ChangeState(CharacterState.Idle);
                         }
                         break;
                     default:
@@ -246,16 +246,6 @@ public class ESpirits_Assassin : Enemy
     {
         switch (eSpiritsState)
         {
-            case ESpiritsState.FindPlayer:
-                switch (newState)
-                {
-                    case CharacterState.Attack:
-                        break;
-                    default:
-                        base.ChangeState(newState);
-                        break;
-                }
-                break;
             case ESpiritsState.Ready:
                 switch (newState)
                 {

+ 77 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Assassin.cs

@@ -0,0 +1,77 @@
+using UnityEngine;
+using Sirenix.OdinInspector;
+
+public class Spirits_Assassin : Demonic
+{
+    [FoldoutGroup("组件")] public AttackTrigger dashTrigger;
+
+    [Space(30)]
+    [Title("Spirits_Assassin属性")]
+
+    public bool isDash;
+    public GameObject dashAttackEffect;
+    public float offset;
+    public DashEffect dashEffect;
+
+    [FoldoutGroup("冲刺")] [LabelText("冲刺距离")] public float rushDistance;
+    [FoldoutGroup("冲刺")] [LabelText("冲刺方向")] public Vector3 targetDir;  
+    [FoldoutGroup("冲刺")] [LabelText("冲刺速度")] public float rushSpeed;  
+
+    private Vector3 startRushPos;
+
+    public override void Attack_summon()
+    {
+        rb.constraints =
+            RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ 
+            | RigidbodyConstraints.FreezeRotation;
+        rb.useGravity = false;
+        attackController.attackTime = totalAttack_summonTime;
+        attackController.attackTrigger.attackInfo = attackController.attackInfo;
+        attackController.ChooseAttack(attackController.attackMethod[0].id);
+        ChangeState(CharacterState.Attack);
+        invincibleTime = totalAttack_summonTime;
+        if (PlayersInput.instance[playerID].bodyTrans.localScale.x > 0)
+        {
+            if (bodyTrans.localScale.x < 0)
+            {
+                Turn();
+            }
+        }
+        else
+        {
+            if (bodyTrans.localScale.x > 0)
+            {
+                Turn();
+            }
+            targetDir = -targetDir;
+        }
+        startRushPos = transform.position;
+        ani.Play("attack_summon", 0, 0);
+        dashTrigger.gameObject.SetActive(true);
+    }
+
+    public override void OnState()
+    {
+        if (!isDash)
+        {
+            switch (state)
+            {
+                case CharacterState.Attack:
+                    rb.velocity = targetDir * rushSpeed;
+                    if (Vector3.Distance(startRushPos, transform.position) > rushDistance)
+                    {
+                        dashTrigger.gameObject.SetActive(false);
+                        rb.velocity = Vector3.zero;
+                        attackController.attackTime = 0;
+                        invincibleTime = 0;
+                        rb.constraints = RigidbodyConstraints.FreezePositionZ
+                            | RigidbodyConstraints.FreezeRotation;
+                        rb.useGravity = true;
+                        ChangeState(CharacterState.Idle);
+                    }
+                    return;
+            }
+        }
+        base.OnState();
+    }
+}

+ 0 - 0
ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Dash.cs.meta → ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Assassin.cs.meta


+ 0 - 146
ActionTowerDefense/Assets/Scripts/Spirits/Spirits_Dash.cs

@@ -1,146 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class Spirits_Dash : MonoBehaviour
-{/*
-    public float moveSpeed;
-    public Rigidbody rb;
-    public Demonic demonic;
-    public bool isDash;
-    [HideInInspector]
-    public float time;
-    public GameObject dashAttackEffect;
-    public float offset;
-    public DashEffect dashEffect;
-
-    [Header("调用")]
-    public PlayerController playerController;   //召唤的玩家
-    public Animator animator;
-
-    [Header("冲刺")]
-    public Vector3 targetDir;       //冲刺方向
-    public GameObject aimEffect;    //瞄准线
-    public float rushSpeed;         //冲刺速度
-    public float dashTime;          //冲刺时间
-
-    private void Start()
-    {
-        playerController = PlayersInput.instance[demonic.playerID];
-        animator.Play("charge", 0, 0);
-        playerController.canMove = false;
-        aimEffect.transform.localScale = new Vector3(rushSpeed * dashTime / 2, 3, 1);
-    }
-
-    private void Update()
-    {
-        if (isDash)
-        {
-            time += Time.deltaTime;
-            Dash();
-            if (time >= dashTime)
-            {
-                DashAttackEffect();
-                demonic.bodyTrans.rotation = Quaternion.Euler(Vector3.zero);
-                dashEffect.canHit = false;
-                demonic.ChangeState(CharacterState.Fall);
-                demonic.enabled = true;
-                animator.Play("fall", 0, 0);
-                this.enabled = false;
-            }
-        }
-        else
-        {
-            if (playerController.keyTransfigurateRelease)
-            {
-                isDash = true;
-                playerController.keyTransfigurateRelease = false;
-                aimEffect.SetActive(false);
-                playerController.canMove = true;
-                animator.Play("rush_attack", 0, 0);
-            }
-            else
-            {
-                aimEffect.SetActive(true);
-                ReadyToDash(playerController.moveVec);
-            }
-        }
-
-
-    }
-    void DashAttackEffect()
-    {
-        rb.velocity = Vector3.zero;
-    }
-
-    //冲刺
-    private void Dash()
-    {
-        if (targetDir == Vector3.zero)
-        {
-            targetDir = playerController.moveVec;
-        }
-        float k = Mathf.Atan2(targetDir.y, targetDir.x) * Mathf.Rad2Deg;
-        if (targetDir.x < 0)
-        {
-            dashEffect.offset = 1;
-            if (demonic.bodyTrans.localScale.x < 0)
-            {
-                demonic.bodyTrans.localScale =
-                    new Vector3(-demonic.bodyTrans.localScale.x, demonic.bodyTrans.localScale.y,
-                    demonic.bodyTrans.localScale.z);
-            }
-
-            demonic.bodyTrans.rotation = Quaternion.Euler(new Vector3(0, 0, k - 180));
-        }
-        else
-        {
-            if (demonic.bodyTrans.localScale.x > 0)
-            {
-                demonic.bodyTrans.localScale =
-                    new Vector3(-demonic.bodyTrans.localScale.x, demonic.bodyTrans.localScale.y,
-                    demonic.bodyTrans.localScale.z);
-            }
-            dashEffect.offset = -1;
-            demonic.bodyTrans.rotation = Quaternion.Euler(new Vector3(0, 0, k));
-        }
-        demonic.rb.velocity = targetDir * rushSpeed;
-    }
-
-    //蓄力
-    public void ReadyToDash(Vector2 leftDir)
-    {
-        if (leftDir == Vector2.zero)
-        {
-            if (targetDir == Vector3.zero)
-            {
-                if (transform.GetChild(0).localScale.x < 0)
-                {
-                    targetDir = Vector3.right;
-                }
-                else
-                {
-                    targetDir = Vector3.left;
-                }
-            }
-        }
-        else
-        {
-            targetDir = leftDir.normalized;
-        }
-        float k = Mathf.Atan2(targetDir.y, targetDir.x) * Mathf.Rad2Deg;
-        aimEffect.transform.rotation = Quaternion.Euler(new Vector3(0, 0, k));
-        if (targetDir.x < 0 && demonic.bodyTrans.localScale.x < 0)
-        {
-            demonic.bodyTrans.localScale =
-                new Vector3(-demonic.bodyTrans.localScale.x, demonic.bodyTrans.localScale.y,
-                demonic.bodyTrans.localScale.z);
-        }
-        if(targetDir.x>0 && demonic.bodyTrans.localScale.x > 0)
-        {
-            demonic.bodyTrans.localScale =
-                new Vector3(-demonic.bodyTrans.localScale.x, demonic.bodyTrans.localScale.y,
-                demonic.bodyTrans.localScale.z);
-        }
-    }*/
-}