示例#1
0
    void Awake()
    {
        player     = GameObject.FindGameObjectWithTag("Player");
        playerMove = player.GetComponent <PlayerMoveInput>();

        // Init pool of still bubbles
        bubblesPool1 = new List <GameObject>();
        for (int i = 0; i < bubblesNum; i++)
        {
            bubblesPool1.Add(Instantiate(bubblesPrefab1, Vector3.zero, Quaternion.identity));
            bubblesPool1[i].SetActive(false);
        }
        bubblesPool2 = new List <GameObject>();
        for (int i = 0; i < bubblesNum; i++)
        {
            bubblesPool2.Add(Instantiate(bubblesPrefab2, Vector3.zero, Quaternion.identity));
            bubblesPool2[i].SetActive(false);
        }


        // Init pool of moving bubbles
        mBubblesPool1 = new List <GameObject>();
        for (int i = 0; i < bubblesNum; i++)
        {
            mBubblesPool1.Add(Instantiate(mBubblesPrefab1, Vector3.zero, Quaternion.identity));
            mBubblesPool1[i].SetActive(false);
        }
        mBubblesPool2 = new List <GameObject>();
        for (int i = 0; i < bubblesNum; i++)
        {
            mBubblesPool2.Add(Instantiate(mBubblesPrefab2, Vector3.zero, Quaternion.identity));
            mBubblesPool2[i].SetActive(false);
        }
    }
示例#2
0
    void OnDisable()
    {
        if (playerMove == null)
        {
            playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>();
        }

        playerMove.IsTeleport = false;
    }
示例#3
0
文件: FloatAura.cs 项目: calsf/aura
    void OnDisable()
    {
        if (playerMove == null)
        {
            playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>();
        }

        playerMove.MaxFallSpeed = playerMove.BaseMaxFallSpeed;
    }
示例#4
0
文件: JumpAura.cs 项目: calsf/aura
    void OnDisable()
    {
        if (playerMove == null)
        {
            playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>();
        }

        playerMove.JumpVelocity = playerMove.BaseJump;
    }
示例#5
0
    void Awake()
    {
        player     = GameObject.FindGameObjectWithTag("Player");
        playerMove = player.GetComponent <PlayerMoveInput>();

        foreach (Transform child in transform)
        {
            if (child.tag == "SpawnPos")
            {
                spawnPos = child;
            }
        }
    }
示例#6
0
    void Awake()
    {
        playerMove       = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMoveInput>();
        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
        anim             = GetComponent <Animator>();

        // Init meteor pool
        meteorPool = new List <GameObject>();
        for (int i = 0; i < poolNum; i++)
        {
            meteorPool.Add(Instantiate(meteorPrefab, Vector3.down * 80, Quaternion.identity));
        }
    }
示例#7
0
文件: SlowTrigger.cs 项目: calsf/aura
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMoveInput>();
 }
示例#8
0
文件: PlayerHP.cs 项目: calsf/aura
 void Awake()
 {
     move        = GetComponent <PlayerMoveInput>();
     controller  = GetComponent <PlayerController>();
     auraControl = GetComponent <PlayerAuraControl>();
 }
示例#9
0
文件: PlayerAnim.cs 项目: calsf/aura
 // Start is called before the first frame update
 void Start()
 {
     move       = GetComponent <PlayerMoveInput>();
     controller = GetComponent <PlayerController>();
     anim       = GetComponent <Animator>();
 }