Пример #1
0
    public override void Fire2(bool value)
    {
        PWPawn CP = (PWPawn)PossesedPawn;

        if (CP)
        {
            CP.Fire2(value);
        }
    }
Пример #2
0
    public override void Horizontal(float value)
    {
        PWPawn CP = (PWPawn)PossesedPawn;

        if (CP)
        {
            CP.Horizontal(value);
        }
    }
Пример #3
0
    public override void Vertical(bool value)
    {
        PWPawn PWP = ((PWPawn)PossesedPawn);

        if (PWP)
        {
            PWP.Vertical(value);
        }
    }
Пример #4
0
    public override void Vertical(float value)
    {
        PWPawn CP = (PWPawn)PossesedPawn;

        if (CP)
        {
            CP.Vertical(value);
        }
    }
Пример #5
0
    public override void Horizontal(float value)
    {
        PWPawn PWP = ((PWPawn)PossesedPawn);

        if (PWP)
        {
            PWP.Horizontal(value);
        }
    }
Пример #6
0
    public override void Vertical(float value)
    {
        //LOG(GetPossesedPawn().ToString());
        PWPawn CP = (PWPawn)PossesedPawn;

        if (CP)
        {
            CP.Vertical(value);
        }
    }
Пример #7
0
    public override void Fire1(bool value)
    {
        if (value)
        {
            //doing this in two lines
            PWPawn p = (PWPawn)PossesedPawn;
            p.Fire1(value);

            // doing this in one line.
            // ((PWPawn)PossesedPawn).Fire1(value);
        }
    }
Пример #8
0
 public override void Interact(bool value)
 {
     if (value)
     {
         LOG("PC: Interact");
         PWPawn PWP = ((PWPawn)PossesedPawn);
         if (PWP)
         {
             PWP.Interact(value);
         }
     }
 }
Пример #9
0
 public override void Fire2(bool value)
 {
     if (value)
     {
         LOG("PC: Fire2");
         PWPawn PWP = ((PWPawn)PossesedPawn);
         if (PWP)
         {
             PWP.Fire2(value);
         }
     }
 }
Пример #10
0
    protected override void UpdateHUD()
    {
        if (!HUD && !PossesedPawn)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("No Hud or Pawn!");
            }
            return;
        }

        PWHUD hud = HUD.GetComponent <PWHUD>();

        if (!hud)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("No Hud Class found");
            }
            return;
        }

        PWPawn pawn = (PWPawn)PossesedPawn;

        if (!pawn)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("Controller doesn't have a PWPawn");
            }
            return;
        }

        if (PossesedPawn.IsSpectator)
        {
            hud.ActivePanel.SetActive(false);
            hud.SpectatePanel.SetActive(true);
            hud.PlayerNumber = (this.InputPlayerNumber + 1);
            hud.SpawnName    = SpawnPreFab.name;
        }
        else
        {
            hud.ActivePanel.SetActive(true);
            hud.SpectatePanel.SetActive(false);
            hud.PlayerNumber = (this.InputPlayerNumber + 1);
            hud.Healths      = (int)pawn.Health;
            hud.Lives        = (int)pawn.Life;
        }
    }
Пример #11
0
    protected override void UpdateHUD()
    {
        if (!HUD && !PossesedPawn)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("No Hud or Pawn!");
            }
            return;
        }

        HUD hud = HUD.GetComponent <HUD>();

        if (!hud)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("No Hud Class found");
            }
            return;
        }

        PWPawn pawn = (PWPawn)PossesedPawn;

        if (!pawn)
        {
            if (!IgnoreHudError)
            {
                LOG_ERROR("Controller doesn't have a PWPawn");
            }
            return;
        }

        if (PossesedPawn.IsSpectator)
        {
        }
        else
        {
        }
    }