コード例 #1
0
    // Use this for initialization
    void Awake()
    {
        //IEnumerator

        CoolDownVar   = ICoolDown();
        JumpVar       = Jump();
        RollVar       = Roll();
        ShakeVar      = Shake();
        LookAroundVar = LookAround();


        shaderHandler = GetComponent <ShaderHandler>();

        mat          = GetComponent <MeshRenderer>().material;
        audioSource  = GetComponent <AudioSource>();
        eggMovement  = GetComponent <EggMovement>();
        eggParameter = GetComponent <EggParameter>();
        exHandler    = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>();
        faceHandler  = GetComponent <FaceExpressionHandler>();

        initPos = transform.localPosition;
        initRot = transform.eulerAngles;
        pos     = transform.position;
        rg      = transform.parent.gameObject.GetComponent <Rigidbody>();
        tf      = transform.parent;

        //Standard PID
        PIDx = new PID(0.4f, 0, 2f);
        PIDy = new PID(0.4f, 0, 2f);
        PIDz = new PID(0.4f, 0, 2f);
    }
コード例 #2
0
 void Awake()
 {
     egg           = GameObject.Find("Egg");
     eggParameter  = egg.transform.Find("clean").gameObject.GetComponent <EggParameter>();
     eggMovement   = egg.transform.Find("clean").gameObject.GetComponent <EggMovement>();
     eggPhysicalAI = egg.transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>();
     exHandler     = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>();
     faceHandler   = egg.transform.Find("clean").GetComponent <FaceExpressionHandler>();
 }
コード例 #3
0
ファイル: EggMovement.cs プロジェクト: richard5635/IIncubate
    void Awake()
    {
        exHandler      = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>();
        faceHandler    = GetComponent <FaceExpressionHandler>();
        gameController = transform.parent.parent.gameObject.GetComponent <GameController>();

        tf = transform.parent;
        rg = transform.parent.gameObject.GetComponent <Rigidbody>();

        initialPosition = tf.position;
        initialRotation = tf.eulerAngles;

        eggParameter  = GetComponent <EggParameter>();
        eggPhysicalAI = GetComponent <EggPhysicalAI>();
    }