void Awake()
 {
     _spriteRenderer = GetComponent <SpriteRenderer>();
     _powerGauge     = FindObjectOfType <PowerGauge>();
     if (!_powerGauge)
     {
         Debug.LogError("No PowerGauge found", this);
     }
     _collider = GetComponent <BoxCollider2D>();
 }
    protected void Start()
    {
        hull = FindObjectOfType(typeof(Hull)) as Hull;
        inventory = FindObjectOfType(typeof(Inventory)) as Inventory;
        crewGauge = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        massGauge = FindObjectOfType(typeof(MassGauge)) as MassGauge;
        powerGauge = FindObjectOfType(typeof(PowerGauge)) as PowerGauge;
        accelerationGauge = FindObjectOfType(typeof(AccelerationGauge)) as AccelerationGauge;
        fuelConsumptionGauge = FindObjectOfType(typeof(FuelConsumptionGauge)) as FuelConsumptionGauge;
    }
Example #3
0
    protected void Start()
    {
        hull        = FindObjectOfType(typeof(Hull)) as Hull;
        inventory   = FindObjectOfType(typeof(Inventory)) as Inventory;
        crewGauge   = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge   = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        massGauge            = FindObjectOfType(typeof(MassGauge)) as MassGauge;
        powerGauge           = FindObjectOfType(typeof(PowerGauge)) as PowerGauge;
        accelerationGauge    = FindObjectOfType(typeof(AccelerationGauge)) as AccelerationGauge;
        fuelConsumptionGauge = FindObjectOfType(typeof(FuelConsumptionGauge)) as FuelConsumptionGauge;
    }
    void Awake()
    {
        _rigidbody      = GetComponent <Rigidbody2D>();
        _particleSystem = GetComponent <ParticleSystem>();
        _powerGauge     = FindObjectOfType <PowerGauge>();
        if (!_powerGauge)
        {
            Debug.Log("No power gauge found");
        }

        _groundedActionState = new GroundedActionState(this);
        _airborneActionState = new AirborneActionState(this);

        _ssj1PowerState = new Ssj1PowerState(this);
        _ssj2PowerState = new Ssj2PowerState(this);
        _ssj3PowerState = new Ssj3PowerState(this);
        SetPowerState(_ssj1PowerState);
    }
Example #5
0
    private bool gaugeCool = false;             // 게이지 쿨다운 플래그


    // 초기화
    private void Awake()
    {
        instance = this;
    }