// 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);
    }
    // Use this for initialization

    void Awake()
    {
        gameController  = GameObject.Find("IIncubate").GetComponent <GameController>();
        eggParameter    = GameObject.Find("Egg").transform.Find("clean").GetComponent <EggParameter>();
        shaderHandler   = GameObject.Find("Egg").transform.Find("clean").GetComponent <ShaderHandler>();
        dialogueHandler = GameObject.Find("DialogueText").GetComponent <DialogueHandler>();
        hatchlingLight  = transform.Find("Light").GetComponent <Light>();
    }
예제 #3
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>();
 }
예제 #4
0
 void Awake()
 {
     eggParameter  = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggParameter>();
     eggMovement   = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggMovement>();
     eggPhysicalAI = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>();
     Egg           = GameObject.Find("Egg");
     rg            = Egg.GetComponent <Rigidbody>();
     //StartCoroutine(ReproduceEgg());
 }
예제 #5
0
    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>();
    }
예제 #6
0
    // Use this for initialization
    void Awake()
    {
        eggMovement  = GetComponent <EggMovement>();
        eggParameter = GetComponent <EggParameter>();

        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);
    }
예제 #7
0
    // Use this for initialization
    void Awake()
    {
        eggParameter    = GameObject.Find("Egg").transform.Find("clean").GetComponent <EggParameter>();
        gameController  = GameObject.Find("IIncubate").GetComponent <GameController>();
        eggParameter    = GameObject.Find("Egg").transform.Find("clean").GetComponent <EggParameter>();
        shaderHandler   = GameObject.Find("Egg").transform.Find("clean").GetComponent <ShaderHandler>();
        dialogueHandler = GameObject.Find("DialogueText").GetComponent <DialogueHandler>();
        hatchlingLight  = transform.Find("Light").GetComponent <Light>();


        chick  = transform.Find("Chick").gameObject;
        cHead  = chick.transform.Find("Head").gameObject;
        cBody  = chick.transform.Find("Body").gameObject;
        cFeet  = chick.transform.Find("Feet").gameObject;
        cWings = chick.transform.Find("Wings").gameObject;

        rg = GetComponent <Rigidbody>();
        tf = gameObject.transform;
    }
 // Use this for initialization
 void Awake()
 {
     eggParameter  = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggParameter>();
     eggMovement   = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggMovement>();
     EggPhysicalAI = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>();
 }