예제 #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
파일: SpawnAtPlayer.cs 프로젝트: calsf/aura
    void Awake()
    {
        player     = GameObject.FindGameObjectWithTag("Player");
        playerMove = player.GetComponent <PlayerMoveInput>();

        foreach (Transform child in transform)
        {
            if (child.tag == "SpawnPos")
            {
                spawnPos = child;
            }
        }
    }
예제 #6
0
파일: MeteoricAura.cs 프로젝트: calsf/aura
    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>();
 }