예제 #1
0
    private void HandleARUpdateVR(int clientId, Vector3 pos, Quaternion rot, int fireType)
    {
        GameObject gameObject;
        bool       success = ARPlayers.TryGetValue(clientId, out gameObject);

        if (!success)
        {
            //NEW AR PLAYER (does not exist in known players dictionary)
            gameObject = Instantiate(spawnables[1], new Vector3(0.0f, 0.0f, 0.0f), new Quaternion(0.0f, 0.0f, 0.0f, 0.0f));
            ARPlayers.Add(clientId, gameObject);
        }
        gameObject.transform.position = pos;
        gameObject.transform.rotation = rot;

        Eyeball eyeball = gameObject.GetComponent <Eyeball>();

        //Here, set whether the player is firing
        switch ((beamType)fireType)
        {
        case beamType.Damage: eyeball.Damage(); break;

        case beamType.Heal: eyeball.Heal(); break;

        case beamType.None: eyeball.Beamless(); break;
        }
    }
예제 #2
0
파일: Mdl.cs 프로젝트: bonomali/Ibasa
        ImmutableArray <Eyeball> LoadEyeballs(Ibasa.IO.BinaryReader reader, int count)
        {
            long offset = reader.BaseStream.Position;

            Eyeball[] eyeballs = new Eyeball[count];
            for (int i = 0; i < count; ++i)
            {
                offset = reader.BaseStream.Position;

                reader.BaseStream.Position = offset;
            }
            return(new ImmutableArray <Eyeball>(eyeballs));
        }
예제 #3
0
파일: Mdl.cs 프로젝트: Frassle/Ibasa
        ImmutableArray<Eyeball> LoadEyeballs(Ibasa.IO.BinaryReader reader, int count)
        {
            long offset = reader.BaseStream.Position;

            Eyeball[] eyeballs = new Eyeball[count];
            for (int i = 0; i < count; ++i)
            {
                offset = reader.BaseStream.Position;

                reader.BaseStream.Position = offset;
            }
            return new ImmutableArray<Eyeball>(eyeballs);
        }