// Use this for initialization
 void Awake()
 {
     gameObject.SetActive( firstActionDialogue );
     dialoguePanel = GameObject.Find( "Panel" );
     dialogueScript = dialoguePanel.GetComponent<loadDialogue>();
     GameObject actionObject = transform.Find( "Action" ).gameObject;
     Action = actionObject.GetComponent<action>();
     sceneSetUp = false;
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        dialogueBox = dialoguePanel.GetComponent<loadDialogue>();
        spawnPosition = gameObject.transform.position;
        GasMask = transform.Find( "GasMask" ).gameObject;
        GasMaskScript = GasMask.GetComponent<gasMask>();
        anim = gameObject.GetComponent<Animator>();

        alive = true;
        playerCanMove = true;
        playerIsGrounded = true;
        gasMaskOn = false;
        playerIsCrouched = false;
        movingLeft = false;
        movingRight = false;
        hasGasMask = false;
        hasCanteen = false;

        jump = new Vector2( 0f, jumpForce );
        rb = gameObject.GetComponent<Rigidbody2D>();
    }
Exemple #3
0
 // Use this for initialization
 void Awake()
 {
     dialoguePanel = GameObject.Find( "Panel" );
     dialogueScript = dialoguePanel.GetComponent<loadDialogue>();
 }