コード例 #1
0
ファイル: Ventil.cs プロジェクト: HGodal/EdutainmentVR
    void Start()
    {
        sluttevent = GameObject.Find("/VentilLogikk").GetComponent <SluttVent>();
        gameObject.AddComponent <Rigidbody>().useGravity  = false;
        gameObject.AddComponent <BoxCollider>().isTrigger = true;

        progress = GameObject.Find("/InfoCanvas/InfoText").GetComponent <ScoreCounter>();

        bolts = GameObject.Find("/Bolts/SkrueLogikk").GetComponent <BoltAction>();
    }
コード例 #2
0
        /// <summary>
        /// Begins the callback between this gameliving source and target (commences a bolt flying between them)
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public void DealLightning()
        {
            int ticksToTarget = currentSource.GetDistanceTo(currentTarget) * 100 / 85; // 85 units per 1/10s
            int delay         = 1 + ticksToTarget / 100;

            foreach (GamePlayer player in currentTarget.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
            {
                player.Out.SendSpellEffectAnimation(currentSource, currentTarget, m_spell.ClientEffect, (ushort)(delay), false, 1);
            }
            BoltAction bolt = new BoltAction(this);

            bolt.Start(1 + ticksToTarget);
        }
コード例 #3
0
ファイル: Screw.cs プロジェクト: HGodal/EdutainmentVR
 void Start()
 {
     bolts = GameObject.Find("/Bolts/SkrueLogikk").GetComponent <BoltAction>();
 }