Ejemplo n.º 1
0
 void Awake()
 {
     behavior         = GetComponentInParent <EnemyBehavior>();
     rb               = GetComponent <Rigidbody2D>();
     mask             = GetComponentInParent <MaskScript>();
     rotatingObjects  = transform.GetChild(1);
     expressionSprite = transform.GetChild(0).GetComponent <SpriteRenderer>();
     ClearExpressionPicture();
 }
Ejemplo n.º 2
0
    void StealMask(GameObject enemy)
    {
        print("SWAP");
        MaskScript enemyMask = enemy.GetComponentInParent <MaskScript>();

        enemyMask.GetComponentInChildren <EnemyScript>().StartCoroutine("Stun");
        mask.maskID = enemyMask.maskID;
        //enemyMask.maskID = mask.maskID;

        //Color temp = mask.color;

        mask.color = enemyMask.color;
        //enemyMask.color = temp;

        mask.SetColor();
        //enemyMask.SetColor();
    }
    // Start is called before the first frame update
    void Start()
    {
        parentScript = GetComponent <PlayerScript>();

        abilityManager = GameObject.Find("VariableManager");

        if (abilityManager)
        {
            _VariableManager = abilityManager.GetComponent <_VariableManager>();
        }

        //Dash Icon
        dashIcon = GameObject.Find("DashIcon");
        maskDash = dashIcon.GetComponent <MaskScript>();
        dashText = GameObject.Find("DashText").GetComponent <Text>();

        //Rapid Fire Icon
        rapidFire     = false;
        rapidFireIcon = GameObject.Find("RapidFireIcon");
        maskRapidFire = rapidFireIcon.GetComponent <MaskScript>();
        rapidFireText = GameObject.Find("RapidFireText").GetComponent <Text>();
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     rb   = GetComponent <Rigidbody2D>();
     mask = GetComponent <MaskScript>();
 }