public void OnStart()
    {
        trans_ = gameObject.RequireComponent<CTransform>();
        upperTrans_ = GameObject.GetGameObjectByName("spinner_upper").RequireComponent<CTransform>();
        lowerTrans_ = GameObject.GetGameObjectByName("spinner_lower").RequireComponent<CTransform>();
        trans_.SetPositionY(lowerTrans_.position.y);

        leftSound_ = GameObject.GetGameObjectByName("spinner_left").RequireComponent<CSound>();
        rightSound_ = GameObject.GetGameObjectByName("spinner_right").RequireComponent<CSound>();

        smc = new StateMachineController();
        startup = new State(smc, null, State_startup_Update, null);
        riseup = new State(smc, State_riseup_OnStart, State_riseup_Update, null);
        lowerdown = new State(smc, State_lowerdown_OnStart, State_lowerdown_Update, null);
        end = new State(smc, null, State_end_Update, null);
        smc.SetState(startup);

        transitionTime_ = 3;

        startupTimer_ = 0;
        startupTime_ = 5;
        shutdownTime_ = 7;

        riseupTimer_ = 0;
        riseupTime_ = 5;

        revInitTime_ = 20.0f;
        revFinalTime_ = 1.0f;
    }
    public void OnStart()
    {
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col0"))
        {
            _col0Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col1"))
        {
            _col1Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col2"))
        {
            _col2Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }
        foreach (GameObject obj in GameObject.GetGameObjectsWithTag("col3"))
        {
            _col3Lights.Add(obj.RequireComponent<CLight>());
            _allLights.Add(obj.RequireComponent<CLight>());
        }

        chilloutFace = GameObject.GetGameObjectByName("lastchilloutface");
        faceRender = chilloutFace.RequireComponent<CSkinMeshRenderer>();
        faceTransform  = chilloutFace.RequireComponent<CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript<DistortForTime>(gameObject);

        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);

        sound = gameObject.RequireComponent<CSound>();
    }
    public void OnStart()
    {
        transform = gameObject.transform;
        pos = transform.GetPosition(CTransform.TransformSpace.GLOBAL);
        newPos = pos;

        if(riseAmt != 0.0f || timer != 0.0f)
        {
            countDown = timer;
        }
    }
    public void OnStart()
    {
        trans_ = gameObject.RequireComponent<CTransform>();
        item_ = (int)Items.I_NO;
        itemPos_ = new List<Vector2>();

        // No
        itemPos_.Insert(0,new Vector2(0.103f,-0.07f));
        // Yes
        itemPos_.Insert(0,new Vector2(0.103f,-0.063f));
    }
    public void OnStart()
    {
        //base.OnStart();
        currAliveTimer = MMath.GetRandomLimitedFloat(_monsterMinActiveTime, _monsterMaxActiveTime);
        currDeadTimer = MMath.GetRandomLimitedFloat(_monsterMinRestTime, _monsterMaxRestTime);

        chilloutFace = GameObject.GetGameObjectByName("maxChill");
        faceRender = chilloutFace.RequireComponent<CSkinMeshRenderer>();
        faceTransform  = chilloutFace.RequireComponent<CTransform>();
        faceRender.setEnabled(false);

        distortScript = GetScript<DistortForTime>(gameObject);
    }
    public void OnStart()
    {
        trans_ = gameObject.RequireComponent<CTransform>();
        item_ = 0;
        itemPos_ = new List<Vector2>();

        // Quit
        itemPos_.Insert(0,new Vector2(0.047f,-0.075f));
        // Credits
        itemPos_.Insert(0,new Vector2(0.04f,-0.048f));
        // Options
        itemPos_.Insert(0,new Vector2(0.04f,-0.025f));
        // How To Play
        itemPos_.Insert(0,new Vector2(0.057f,0.0f));
        // Start
        itemPos_.Insert(0,new Vector2(0.03f,0.025f));
    }
    public void OnStart()
    {
        trans_ = gameObject.RequireComponent<CTransform>();
        item_ = 0;
        itemPos_ = new List<Vector2>();

        // Quit
        itemPos_.Insert(0,new Vector2(0.14f,-0.045f));
        // Main Menu
        itemPos_.Insert(0,new Vector2(0.14f,-0.012f));
        // Options
        itemPos_.Insert(0,new Vector2(0.14f,0.022f));
        // How To Play
        itemPos_.Insert(0,new Vector2(0.14f,0.032f));
        // Resume
        itemPos_.Insert(0,new Vector2(0.16f,0.042f));
    }
    public void OnStart()
    {
        CMeshRenderer mesh = gameObject.RequireComponent<CMeshRenderer>();
        mesh.setEnabled(false);

        GameObject room = GameObject.GetGameObjectByName(_name);
        PuzzleBEnvironmentController envScript = GetScript<PuzzleBEnvironmentController>(room);
        envScript.AddSpawnZone(_region,this);

        _transform = gameObject.RequireComponent<CTransform>();

        Vector3 pos = _transform.GetPosition(CTransform.TransformSpace.GLOBAL);
        Vector3 scale = _transform.scale;

        position = _transform.GetPosition(CTransform.TransformSpace.GLOBAL);

        minZ = pos.Z - scale.Z * 0.5f;
        maxZ = pos.Z + scale.Z * 0.5f;

        minX = pos.X - scale.X * 0.5f;
        maxX = pos.X + scale.X * 0.5f;

        y = pos.Y;
    }
Example #9
0
 public void RotateAround(float x, float y, float z, float angle, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_RotateAround__SWIG_0(swigCPtr, x, y, z, angle, (int)space);
 }
Example #10
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CTransform obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
Example #11
0
 public void SetScale(float x, float y, float z, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetScale__SWIG_2(swigCPtr, x, y, z, (int)space);
 }
Example #12
0
 public void SetScale(MochaVec3 scale, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetScale__SWIG_0(swigCPtr, MochaVec3.getCPtr(scale), (int)space);
     if (SharpMochaPINVOKE.SWIGPendingException.Pending) throw SharpMochaPINVOKE.SWIGPendingException.Retrieve();
 }
Example #13
0
 public void SetRotation(float x, float y, float z, float angle, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetRotation__SWIG_2(swigCPtr, x, y, z, angle, (int)space);
 }
Example #14
0
 public void SetRotation(MochaVec3 rot, float angle, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetRotation__SWIG_0(swigCPtr, MochaVec3.getCPtr(rot), angle, (int)space);
     if (SharpMochaPINVOKE.SWIGPendingException.Pending) throw SharpMochaPINVOKE.SWIGPendingException.Retrieve();
 }
Example #15
0
 public void SetPositionZ(float z, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetPositionZ__SWIG_0(swigCPtr, z, (int)space);
 }
Example #16
0
 public void SetPosition(MochaVec3 pos, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_SetPosition__SWIG_0(swigCPtr, MochaVec3.getCPtr(pos), (int)space);
     if (SharpMochaPINVOKE.SWIGPendingException.Pending) throw SharpMochaPINVOKE.SWIGPendingException.Retrieve();
 }
Example #17
0
 public void SetParent(CTransform parent)
 {
     SharpMochaPINVOKE.CTransform_SetParent(swigCPtr, CTransform.getCPtr(parent));
 }
Example #18
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CTransform obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Example #19
0
 public void Rotate(float x, float y, float z, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_Rotate__SWIG_0(swigCPtr, x, y, z, (int)space);
 }
Example #20
0
 public MochaVec3 GetScale(CTransform.TransformSpace space)
 {
     MochaVec3 ret = new MochaVec3(SharpMochaPINVOKE.CTransform_GetScale__SWIG_0(swigCPtr, (int)space), true);
     return ret;
 }
Example #21
0
 public MochaVec3 GetPosition(CTransform.TransformSpace space)
 {
     MochaVec3 ret = new MochaVec3(SharpMochaPINVOKE.CTransform_GetPosition(swigCPtr, (int)space), true);
     return ret;
 }
Example #22
0
 public void SetParent(CTransform parent)
 {
     SharpMochaPINVOKE.CTransform_SetParent(swigCPtr, CTransform.getCPtr(parent));
 }
Example #23
0
 public void RotateAround(MochaVec3 vec, float angle, CTransform.TransformSpace space)
 {
     SharpMochaPINVOKE.CTransform_RotateAround__SWIG_2(swigCPtr, MochaVec3.getCPtr(vec), angle, (int)space);
     if (SharpMochaPINVOKE.SWIGPendingException.Pending) throw SharpMochaPINVOKE.SWIGPendingException.Retrieve();
 }