// Use this for initialization void Start() { carryItem = null; controller = this.GetComponent <CharacterController>(); UI = GameObject.Find("/OperationUI").GetComponent <UIController>(); playerInformation = gameObject.GetComponent <playerController>(); cat = GameObject.FindGameObjectWithTag("Cat").GetComponent <CatMove>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); }
private void Spawn(bool hat, int health, bool runner) { GameObject spawned = (GameObject)Instantiate(cat, transform.position, Quaternion.identity); CatMove catFeatures = spawned.GetComponent <CatMove> (); catFeatures.hasHat = hat; catFeatures.isRunner = runner; catFeatures.maxHealth = health; spawned.GetComponentInChildren <SpriteRenderer> ().sortingOrder = orderInLayer; logic.registerEnemy(spawned); }
// Start is called before the first frame update void Start() { rb.GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); playerHP = GetComponent <PlayerHealth>(); batMove = GetComponent <BatMove>(); catMove = GetComponent <CatMove>(); ratMove = GetComponent <RatMove>(); animals[0].SetActive(false); animals[1].SetActive(true); animals[2].SetActive(false); upperLength = groundLength; }
private void Start() { State = MeowState.NoMeow; catHunger = GetComponent <CatHunger>(); catMove = GetComponent <CatMove>(); }
void Awake() { catMove = GetComponent <CatMove> (); }
// Start is called before the first frame update void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <playerController>(); cat = GameObject.Find("Cat").GetComponent <CatMove>(); }