示例#1
0
    public void LevelUp()
    {
        playerT  = GetComponent <PlayerCtrl>();
        animator = GetComponent <Animator>();
        GameObject gam = transform.GetChild(0).gameObject;

        maskt = gam.GetComponent <MaskCtrl>();
        playerT.ObjectCount += 1;
    }
示例#2
0
 private void Start()
 {
     rigibody2D     = GetComponent <Rigidbody2D>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     animator       = GetComponent <Animator>();
     maskt          = GetComponent <MaskCtrl>();
     playerT        = GetComponent <PlayerCtrl>();
     IsScare        = false;
     Player         = playerT;
     DieSpeed       = 0.1f;
     AniLock        = true;
     PlayerPosition = transform.position;
 }
示例#3
0
    public void UseLamp()
    {
        if (this.name.ToLower().Contains("Crystal".ToLower()) && BeUse)
        {
            PlayerCtrl.Player.LevelUp();
            //_animator.SetBool("LampBeTouch",true);
            _animator.Play("Crystal_Crash");
            ChangeMap.LampBeUse = true;
            MaskCtrl.MaskWait(5, MaskCtrl.CurrectTargetScal);
            if (SceneManager.GetActiveScene().name == "m1")
            {
                var map = GameObject.Find("MapCreat");
                map.GetComponent <MapV2>().ChangeSigelState();
            }

            BeUse = false;
        }
    }