예제 #1
0
 void Start()
 {
     Normal.Normalize();
     TouchMirror = true;
     OnPress     = false;
     player      = _StageObject.GetPlayer().GetComponent <Player>();
 }
예제 #2
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.name == "Player")
     {
         Touch  = true;
         player = gameManagee.GetPlayer().GetComponent <Player>();
     }
 }
예제 #3
0
 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();
     }
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
 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;
     }
 }
예제 #6
0
 void Start()
 {
     TouchMirror = false;
     OnPress     = false;
     player      = _StageObject.GetPlayer().GetComponent <Player>();
 }
예제 #7
0
 void Start()
 {
     Touch   = false;
     player  = _StageObject.GetPlayer().GetComponent <Player>();
     Monster = _StageObject._Monster;
 }
예제 #8
0
 void Start()
 {
     IsOn   = false; Touch = false;
     player = _StageObject.GetPlayer().GetComponent <Player>();
 }
예제 #9
0
 void Start()
 {
     player      = _StageObject.GetPlayer().GetComponent <Player>();
     TouchCharge = false;
 }
예제 #10
0
 void Start()
 {
     player = _StageObject.GetPlayer().GetComponent <Player>();
     Direction.Normalize();
     TouchLaser = false;
 }