예제 #1
0
    IEnumerator EnragedAnimation()
    {
        yield return(new WaitForSeconds(1));

        core.gameObject.SetActive(true);
        repeller.Function(ref objectList, transform.position);
    }
예제 #2
0
    public void Laser()
    {
        Vector3 position = transform.position;

        if (currentNode.Next == null || position.x > 53 || position.x < -53 || position.y > 30 || position.y < -30)
        {
            return;
        }

        Vector3 nextPosition = currentNode.Next.Value.transform.position;
        LinkedListNode <CutterEnemy> checkedNode = currentNode;

        while (nextPosition.x > 53 || nextPosition.x < -53 || nextPosition.y > 30 || nextPosition.y < -30)
        {
            if (checkedNode.Next == null)
            {
                return;
            }

            nextPosition = checkedNode.Next.Value.transform.position;
            checkedNode  = checkedNode.Next;
        }

        CutterLaser newInstance = Instantiate(laser, transform.position, Quaternion.identity).GetComponent <CutterLaser>();

        newInstance.SetSpace(GetSpace());
        newInstance.Setup(transform.position, nextPosition);


        if (boss)
        {
            Debug.Log("Repelled");
            repeller.Function(ref objectList, transform.position);
        }
    }
예제 #3
0
 public override void SpacePower()
 {
     if (energyLevel <= 0)
     {
         return;
     }
     repeller.Function(ref objectList, transform.position);
     UseEnergyCell(-1);
 }