void Update() { AlloAnimation(); events = FindObjectOfType <GameEvents_Allo>(); Vector3 scale = this.gameObject.transform.localScale; if (attackON) { state = "ATTACK"; } if (!attackON) { state = "RUN"; } if (tamaON) { if (events.posNumber == 1) { Instantiate(tama1Obj); } if (events.posNumber == 2) { Instantiate(tama2Obj); } if (events.posNumber == 3) { Instantiate(tama3Obj); } tamaON = false; } if (Lv3Bool) { // 拡大する gameObject.transform.localScale = new Vector3( scale.x + 0.1f, scale.y + 0.1f, scale.z ); // もし大きさが5を超えたら拡大を止める // 複製する if (scale.x > 4) { gameObject.transform.localScale = new Vector3( scale.x, scale.y, scale.z ); if (alloBigBool) { Instantiate(alloBigObj); alloBigBool = false; } Destroy(this.gameObject); } } }
void Start() { this.animator = GetComponent <Animator>(); this.rb = GetComponent <Rigidbody2D>(); events = FindObjectOfType <GameEvents_Allo>(); events.AlloBig = true; state = "RUN"; StartCoroutine("Moving"); }
void Start() { this.rb = GetComponent <Rigidbody2D>(); events = FindObjectOfType <GameEvents_Allo>(); if (JumpRight) { run = 1f; startX = this.transform.position.x + 2.7f; } if (!JumpRight) { run = -1f; startX = this.transform.position.x - 2.7f; } }
void Start() { events = FindObjectOfType <GameEvents_Allo>(); }
void Start() { events = FindObjectOfType <GameEvents_Allo>(); events.moveOK = true; }
float speed = 5f; // 移動スピード void Start() { this.rb = GetComponent <Rigidbody2D>(); col = GetComponent <Collider2D>(); events = FindObjectOfType <GameEvents_Allo>(); }