コード例 #1
0
        public override void Awake(Scene scene)
        {
            base.Awake(scene);

            // store the values for these private variables.
            DynData <WaterFall> self = new DynData <WaterFall>(this);

            loopingSfx       = self.Get <SoundSource>("loopingSfx");
            enteringSfx      = self.Get <SoundSource>("enteringSfx");
            loopingSfxEvent  = loopingSfx.EventName;
            enteringSfxEvent = enteringSfx.EventName;

            toggle.UpdateFlag();

            if (toggle.Enabled)
            {
                alreadyTurnedOnOnce = true;
            }
        }
コード例 #2
0
 public override void Added(Scene scene)
 {
     base.Added(scene);
     toggle.UpdateFlag();
 }