示例#1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         foreach (GameObject platform in rotatingPlatforms)
         {
             RotatingPlatform myScript = platform.gameObject.GetComponent <RotatingPlatform>();
             myScript.enabled = false;
         }
     }
 }
示例#2
0
    void Awake()
    {
        m_StartPosition   = transform.position;
        m_InitialMovement = m_SmoothMovement;

        // activate doors
        m_DoorController = GetComponent <DoorController>();

        // active sounds
        m_PlatformSoundFX  = GetComponent <PlatformSoundFX>();
        m_RotatingPlatform = GetComponent <RotatingPlatform>();
    }
    private void Awake()
    {
        startPosition   = transform.position;
        initialMovement = smoothMovement;

        // activate doors
        doorController = GetComponent <DoorController>();

        // add sound
        soundFX = GetComponent <PlatformSoundFX>();

        if (activateRotation)
        {
            rotatePlatform = GetComponent <RotatingPlatform>();
        }
    }
 private void Awake()
 {
     rotatingPlatform = GetComponentInParent <RotatingPlatform>();
 }
示例#5
0
 void Awake()
 {
     m_RotatingPlatform = GetComponentInParent <RotatingPlatform>();
     m_SoundFX          = GetComponent <PlatformSoundFX>();
 }