Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        //system init
        intervalCnt = 0;

        //cash
        //camera controller
        cameraCtr = Camera.main.GetComponent <fld_cameraController>();

        //scene controller
        sceneCtr = GameObject.Find("fld_sceneController");
        scn      = sceneCtr.GetComponent <cmn_sceneController> ();

        //screen controller
        screenCtr = GameObject.Find("fld_screenController");
        scr       = screenCtr.GetComponent <cmn_screenController> ();

        //display controller
        displayCtr = GameObject.Find("fld_displayController");
        dsc        = displayCtr.GetComponent <fld_displayController> ();

        //stage controller
        stageCtr = GameObject.Find("fld_stageController");
        stc      = stageCtr.GetComponent <fld_stageController> ();

        //playercontroller
        playerCtr = GameObject.Find("fld_playerController");
        plc       = playerCtr.GetComponent <fld_playerController> ();

        //hiari controller
        fld_hiariCtr = GameObject.Find("fld_hiariController");
        hac          = fld_hiariCtr.GetComponent <fld_hiariController> ();

        //game mode
        gameMode = gmFadein;
        gmCnt    = 0;

        //encount score
        enstime = 0.0f;

        //sound
        pokesnd = false;

        //field map
        fldmap = new int[23, 13];

        //generate field map
        generateFieldMap();

        //set car map
        setCarMap();

        //generate field object
        generateFieldObject();

        //hiari set
        setHiari();
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        //system init
        intervalCnt = 0;

        //cash
        //transform cash
        cashTransform = transform;

        //rigidbody cash
        cashRigidbody = GetComponent <Rigidbody>();

        //camera controller
        cameraCtr = Camera.main.GetComponent <fld_cameraController>();

        //maincontroller
        mainCtr = GameObject.Find("fld_mainController");
        mc      = mainCtr.GetComponent <fld_mainController> ();

        //ant controller
        antCtr = GameObject.Find("fld_fire-ant");
        atc    = antCtr.GetComponent <fld_antController> ();

        //playercontroller
        playerCtr = GameObject.Find("fld_playerController");
        plc       = playerCtr.GetComponent <fld_playerController> ();

        //move
        movseq    = movwakeup;
        movcnt    = 0;
        thinkwait = 0;
        rotatecnt = 0;
        rotatedir = 0;
        //rotate
        ytdir = 0.0f;
        ycdir = 0.0f;
        xdir  = 0.0f;
        zdir  = 0.0f;

        //fix initial pos
        //(set from parent)

        //action
        actseq = 0;
        actcnt = 0;
    }