Polished game

This commit is contained in:
AlexMamontow 2021-09-23 12:18:44 +03:00
parent b6cbb693dc
commit 0d54723900
21 changed files with 143135 additions and 21718 deletions

View File

@ -176,7 +176,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5182c2cb5eef6d849b560f764c4a0ed6, type: 3}
m_Name:
m_EditorClassIdentifier:
startHealth: 50
startHealth: 250
currentHealth: 0
playerImpactVFX: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}
@ -225,6 +225,7 @@ MonoBehaviour:
protectionDistance: 4
_currentEnemy: {fileID: 0}
_currentTargetTile: {fileID: 0}
_currentFollowingPath: []
--- !u!114 &5137071782196184314
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -289,7 +289,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5182c2cb5eef6d849b560f764c4a0ed6, type: 3}
m_Name:
m_EditorClassIdentifier:
startHealth: 50
startHealth: 250
currentHealth: 0
playerImpactVFX: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}
@ -338,6 +338,7 @@ MonoBehaviour:
protectionDistance: 4
_currentEnemy: {fileID: 0}
_currentTargetTile: {fileID: 0}
_currentFollowingPath: []
--- !u!114 &5657602507249370745
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -289,7 +289,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5182c2cb5eef6d849b560f764c4a0ed6, type: 3}
m_Name:
m_EditorClassIdentifier:
startHealth: 50
startHealth: 250
currentHealth: 0
playerImpactVFX: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}
@ -338,6 +338,7 @@ MonoBehaviour:
protectionDistance: 4
_currentEnemy: {fileID: 0}
_currentTargetTile: {fileID: 0}
_currentFollowingPath: []
--- !u!114 &8834890311105204201
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -9,6 +9,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2088596190299031929}
- component: {fileID: -8898625679934015859}
- component: {fileID: 8413281927074889085}
m_Layer: 0
m_Name: CrystalContainer
m_TagString: Untagged
@ -34,6 +36,39 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-8898625679934015859
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8858714285192226355}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cdb480d4011a50c488ad69c1b525d8bb, type: 3}
m_Name:
m_EditorClassIdentifier:
owner: 2
startHealth: 190
currentHealth: 0
playerImpactVFX: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}
groundImpactVFX: {fileID: 6794377120831721188, guid: 2e8dc25f6c4c6264e95bc99e5bffa3e5,
type: 3}
--- !u!136 &8413281927074889085
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8858714285192226355}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
m_Radius: 0.3
m_Height: 2.68
m_Direction: 1
m_Center: {x: 0, y: 1.41, z: 0}
--- !u!1001 &5497938960835943598
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -2155,7 +2155,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 506220390}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.149, z: 0}
m_LocalPosition: {x: 21.2, y: -0.149, z: -16.4}
m_LocalScale: {x: 8, y: 8, z: 8}
m_Children: []
m_Father: {fileID: 0}
@ -4277,7 +4277,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
adjTile_1: {fileID: 6367004625385879252}
adjTile_2: {fileID: 6367004625173646109}
targTestTile: {fileID: 8642427713638086980}
_tileMaterials:
- {fileID: 2100000, guid: c02e8d529be43e94ab7b3ebd42206ef3, type: 2}
- {fileID: 2100000, guid: bd89495900127264dbf244c2afef5812, type: 2}
@ -5091,36 +5090,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1163069907}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1185465496
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1185465497}
m_Layer: 0
m_Name: test
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1185465497
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185465496}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1234336363
PrefabInstance:
m_ObjectHideFlags: 0
@ -7581,7 +7550,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5182c2cb5eef6d849b560f764c4a0ed6, type: 3}
m_Name:
m_EditorClassIdentifier:
startHealth: 10000
startHealth: 310
currentHealth: 0
playerImpactVFX: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 14cf6319e1e8c7648992aba2c9c5caa0
guid: 49885f4f54f07814cb64db50e063f6a0
DefaultImporter:
externalObjects: {}
userData:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 14cf6319e1e8c7648992aba2c9c5caa0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1897,7 +1897,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &903249948
RectTransform:
m_ObjectHideFlags: 0

View File

@ -159,7 +159,7 @@ public class AI_BotController : MonoBehaviour
//calculate path
TileInfo currentTile = _playerState.currentTile;
TileInfo targetPathTile = TileManagment.GetClosestOtherTile(currentTile, _playerState.ownerIndex, _startBotPoint);
Debug.Log(targetPathTile + " in pos "+ targetPathTile.tilePosition);
//Debug.Log(targetPathTile + " in pos "+ targetPathTile.tilePosition);
_triesToCalculatePath++;
if (_triesToCalculatePath < _maxTriesToCalculatePath)
{
@ -499,7 +499,7 @@ public class AI_BotController : MonoBehaviour
_currentFollowingPath.Clear();
}
_currentFollowingPath = Pathfinding.FindPath(curentPos, target, TileManagment.levelTiles, TileManagment.tileOffset);
Debug.Log("created path to " + target);
//Debug.Log("created path to " + target);
if (_currentFollowingPath != null)
{
return true;

View File

@ -21,6 +21,7 @@ public class Build : PlayerAction
base.StartActionOperations(targetTile, currentPlayer);
targetTile.canMove = false;
var spawnedTower = Instantiate(buildPref, targetTile.tilePosition, buildPref.transform.rotation);
spawnedTower.GetComponent<ToweHealthController>().owner = currentPlayer.ownerIndex;
int activeModelIndex = (int)currentPlayer.ownerIndex - 1;
spawnedTower.transform.GetChild(activeModelIndex).gameObject.SetActive(true);
TileManagment.AssignBuildingToTile(targetTile, spawnedTower);

View File

@ -68,6 +68,10 @@ public class SuperJump : PlayerAction
if (tile.tileOwnerIndex != currentPlayer.ownerIndex)
{
capController.CaptureTile(tile);
if (tile.buildingOnTile != null)
{
Destroy(tile.buildingOnTile);
}
}
}

View File

@ -206,6 +206,7 @@ public class DeathChecker : MonoBehaviour
TileManagment.OnInitialized = null;
CustomInput.OnTouchDown = null;
CustomInput.OnTouchUp = null;
CharSpawner.OnPlayerSpawned = null;
StartCoroutine(GoToMenuAfter(3f));
}
//////////////////////////PLAYER DEATH//////////////

View File

@ -21,7 +21,7 @@ public class TileManagment : MonoBehaviour
public static Vector3[] basicDirections;
[SerializeField]
private TileInfo adjTile_1, adjTile_2, targTestTile;
private TileInfo adjTile_1, adjTile_2;
[SerializeField]
private List<Material> _tileMaterials;

View File

@ -72,6 +72,7 @@ public class ProjectileController : MonoBehaviour
var healthController = other.gameObject.GetComponent<HealthController>();
var playerState = other.gameObject.GetComponent<PlayerState>();
var treeController = other.gameObject.GetComponent<TreeHealthController>();
var towerController = other.gameObject.GetComponent<ToweHealthController>();
if (healthController && owner != playerState.ownerIndex)
{
healthController.GetComponent<AudioController>().PlayHitSound();
@ -83,5 +84,17 @@ public class ProjectileController : MonoBehaviour
treeController.TakeDamage(damage);
Destroy(gameObject);
}
if (towerController && owner != towerController.owner)
{
if (owner != towerController.owner)
{
towerController.TakeDamage(damage);
}
else
{
towerController.TakeDamage(0f);
}
Destroy(gameObject);
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ToweHealthController : MonoBehaviour
{
public TileOwner owner;
public float startHealth = 2000f;
public float currentHealth;
public GameObject playerImpactVFX, groundImpactVFX;
private void OnEnable()
{
currentHealth = startHealth;
}
public void TakeDamage(float amount)
{
if (currentHealth < 0)
return;
currentHealth -= amount;
Instantiate(playerImpactVFX, transform.position, playerImpactVFX.transform.rotation);
Instantiate(groundImpactVFX, transform.position + Vector3.up * 0.01f, groundImpactVFX.transform.rotation);
if (currentHealth <= 0)
{
Die();
}
}
private void Die()
{
Destroy(gameObject);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cdb480d4011a50c488ad69c1b525d8bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,8 +13,5 @@ EditorBuildSettings:
guid: 9fc0d4010bbf28b4594072e72b8655ab
- enabled: 1
path: Assets/Scenes/Level_2.unity
guid: 14cf6319e1e8c7648992aba2c9c5caa0
- enabled: 1
path: Assets/Scenes/TestLevel.unity
guid: 23269e68941dc854ea643310f62e3eac
guid: 49885f4f54f07814cb64db50e063f6a0
m_configObjects: {}

View File

@ -127,7 +127,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.35
bundleVersion: 0.36
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0