예제 #1
0
 private void Start()
 {
     g            = Mathf.Abs(Physics2D.gravity.y);
     line         = gameObject.GetComponent <LineRenderer>();
     line.enabled = false;
     fc           = GetComponent <Flare_Counter>();
 }
예제 #2
0
    public void Refill()
    {
        Flare_Counter fc = arm.GetComponent<Flare_Counter>();
        int flaresgiven = fc.maxflares - fc.flares;

        if(flaresAvailable < flaresgiven)
        {
            fc.flares += flaresAvailable;
            flaresAvailable = 0;
        }
        else
        {
            fc.flares += flaresgiven;
            flaresAvailable -= flaresgiven;
        }

        
    }
예제 #3
0
 private void Start()
 {
     fc = GetComponent <Flare_Counter>();
 }