Esempio n. 1
0
 void Start()
 {
     this.rb       = GetComponent <Rigidbody2D>();
     this.animator = GetComponent <Animator>();
     events        = FindObjectOfType <GameEvents_HolePast>();
     run           = 1f;
     state         = "OPEN";
 }
Esempio n. 2
0
    bool right;                 // 左右管理

    void Start()
    {
        this.animator = GetComponent <Animator>();
        this.rb       = GetComponent <Rigidbody2D>();
        events        = FindObjectOfType <GameEvents_HolePast>();

        Vector3 scale = transform.localScale;

        scale.x  = 3f;
        run      = -1f;
        swimming = true;
    }
Esempio n. 3
0
    public float speed = 2f;   // 移動スピード

    void Start()
    {
        this.rb = GetComponent <Rigidbody2D>();

        if (!gameOverScene)
        {
            events = FindObjectOfType <GameEvents_HolePast>();
        }
        if (gameOverScene)
        {
            game = FindObjectOfType <GameOver_HolePast>();
        }
    }
Esempio n. 4
0
    void Start()
    {
        this.rb        = GetComponent <Rigidbody2D>();
        events         = FindObjectOfType <GameEvents_HolePast>();
        events.jumpNow = true;

        runY = 1f;

        if (JumpRight)
        {
            runX   = 1f;
            startX = this.transform.position.x + 2.7f;
        }

        if (!JumpRight)
        {
            runX   = -1f;
            startX = this.transform.position.x - 2.7f;
        }
    }
    public float speed = 2f;   // 移動スピード

    void Start()
    {
        this.rb = GetComponent <Rigidbody2D>();
        events  = FindObjectOfType <GameEvents_HolePast>();
    }
Esempio n. 6
0
 void Start()
 {
     events = FindObjectOfType <GameEvents_HolePast>();
 }