void Start() { Normal.Normalize(); TouchMirror = true; OnPress = false; player = _StageObject.GetPlayer().GetComponent <Player>(); }
void OnTriggerEnter2D(Collider2D collision) { if (collision.name == "Player") { Touch = true; player = gameManagee.GetPlayer().GetComponent <Player>(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Bullet") { state = 2; flagTime = Time.time + 5;//暂定+5秒 } if (collision.gameObject.tag == "Player") { Gam = gameManagee.GetPlayer(); Gam.GetComponent <Player>().Injure(); } }
void OnTriggerEnter2D(Collider2D collision) { if (collision.name == "Player" && IsWater) { _StageObject.GetPlayer().GetComponent <Player>().Die(); } if (collision.name == "OilBucket") { IsWater = false; GetComponent <SpriteRenderer>().material.SetColor("_Color", new Color(1, 1, 0)); GetComponent <SpriteRenderer>().material.SetFloat("_Speed", 2.5f); Destroy(collision.gameObject); } }
private void OnTriggerStay2D(Collider2D collision) { if (Input.GetKeyDown(_StageObject.GetPlayer().GetComponent <Player>().Press) && itrue == true) { play = collision.gameObject.GetComponent <Player>(); play.RecvInput = false; play.GetComponent <Rigidbody2D>().velocity = Vector2.zero; play.Bright = false; itrue = false; Magnet.GetComponent <ChangeCharacter>().itrue = true; player2.GetComponent <Player>().Bright = true; player2.GetComponent <Player>().RecvInput = true; _StageObject.ActivePlayer = player2; } }
void Start() { TouchMirror = false; OnPress = false; player = _StageObject.GetPlayer().GetComponent <Player>(); }
void Start() { Touch = false; player = _StageObject.GetPlayer().GetComponent <Player>(); Monster = _StageObject._Monster; }
void Start() { IsOn = false; Touch = false; player = _StageObject.GetPlayer().GetComponent <Player>(); }
void Start() { player = _StageObject.GetPlayer().GetComponent <Player>(); TouchCharge = false; }
void Start() { player = _StageObject.GetPlayer().GetComponent <Player>(); Direction.Normalize(); TouchLaser = false; }