public void Spawn(Vector3 position) { pos.position = position; damage = infoTower.damage; attakSpeed = infoTower.attakSpeed; attakRange = infoTower.attakRange; typeTower = infoTower.typeTower; typeAttak = infoTower.typeAttak; render.material = standart; sound = GetComponent <AllSounds>(); sound.AddSound(); creation = false; AddCell((int)position.x, (int)position.y); }
public bool IsAttak(TypeAttak type) { if (type == TypeAttak.all) { return(true); } if (type == TypeAttak.mele && typeMove == TypeMove.standart) { return(true); } if (type == TypeAttak.range && typeMove == TypeMove.air) { return(true); } return(false); }