Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(instance);
     }
     else
     {
         Destroy(gameObject);
     }
 }
    // Update is called once per frame
    void Update()
    {
        OriginPoint = GameObject.FindGameObjectWithTag("OriginPoint").GetComponent <Transform>();
        pRef        = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>();
        powerButton = GameObject.FindGameObjectWithTag("PBUI").GetComponent <Image>();
        dpadRef     = GameObject.FindGameObjectWithTag("DpadController").GetComponent <DpadController>();

        pRef.AttackPower = PlayerAttackPower;

        PowerCoreCollect();

        PositiveAlignment();
        NegativeAlignment();
    }
Exemplo n.º 3
0
 void OnDestroy()
 {
     _instance = null;
 }
Exemplo n.º 4
0
 void Awake()
 {
     _instance = this;
 }