void Start() { instance = this; player = GetComponent <AI_Player>(); property = GetComponent <ObjectProperty>(); animator = GetComponent <Animator>(); controller = GetComponent <CharacterController>(); property.Reset(); }
public void Respawn(Transform spot) { transform.position = spot.position; transform.rotation = spot.rotation; if (!transform.gameObject.activeSelf) { var spawn = SpawnManager.instance.Respawn(property); Debug.Assert(spawn == property, "respawn failed!!"); } property.Reset(); }
protected void OnEnable() { Debug.Assert(null != property, "Unit's propery is null"); property.Reset(); }