//
// Copyright(C) 2014-2015 Samuel Villarreal
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// DESCRIPTION:
//      Object Class For Iggy
//

#include "scripts/common.txt"

/*
==============================================================
TurokIggy
==============================================================
*/

class TurokIggy : ScriptObject
{
    kActor @self;
    
    TurokIggy(kActor @actor)
    {
        @self = actor;
    }
    
    /*
    ==============================================================
    IntroCinematicEvent
    ==============================================================
    */
    
    void IntroCinematicEvent(kActor @instigator, const float w, const float x, const float y, const float z)
    {
        if(Game.GetCurrentMapID() != 46)
        {
            return;
        }
        
        PlayLoop.ChangeMap("levels/level43.map");
    }
    
    /*
    ==============================================================
    OnTick
    ==============================================================
    */
    
    void OnTick(void)
    {
    }
    
    /*
    ==============================================================
    OnBeginLevel
    ==============================================================
    */
    
    void OnBeginLevel(void)
    {
        self.AnimState().Set(anim_activate, 8.0f, 0);
    }
    
    /*
    ==============================================================
    OnSpawn
    ==============================================================
    */
    
    void OnSpawn(void)
    {
    }
};
