Ejemplo n.º 1
0
    public void Initialize(F3DFXController f3d)
    {
        fxController = f3d;
        firstUpdate  = true;
        nbuffer      = new NStateBuffer(pbuffsize);
        Show(false);

        vectorGrid    = GameObject.FindWithTag("vectorgrid");
        gridComponent = vectorGrid.GetComponentInChildren <VectorGrid>();
        //  velocityEstimate = new Vector2(item.Rotation.X, item.Rotation.Y) * 2f;
    }
Ejemplo n.º 2
0
    void Awake()
    {
        // Initialize singleton
        instance = this;

        // Initialize bullet shells particles
        for (int i = 0; i < ShellParticles.Length; i++)
        {
            ShellParticles[i].enableEmission = false;
            ShellParticles[i].gameObject.SetActive(true);
        }
    }
Ejemplo n.º 3
0
    public void Initialize(Game mmoGame, Item actorItem, string name, Radar worldRadar)
    {
        totalGold          = 0;
        isBuildMode        = false;
        isSuperFast        = false;
        this.item          = actorItem;
        this.name          = name;
        transform.position = new Vector3(this.item.Position.X, transform.position.y, this.item.Position.Y) *
                             RunBehaviour.WorldToUnityFactor;
        currHealth = maxHealth;
        healthBar  = GameObject.FindWithTag("hpbar").GetComponent <SimpleHealthBar>();
        UnparentLaserAndStoreRef();
        if (this.item.IsMine)
        {
            playerCam = GameObject.FindWithTag("MainCamera");
            playerCam.GetComponent <CameraController>().playerShip = this.gameObject;
            vectorGrid = GameObject.FindWithTag("vectorgrid");
            //           vectorGrid.transform.position = this.transform.position;
            gridComponent = vectorGrid.GetComponentInChildren <VectorGrid>();
        }
        //        GameObject.FindWithTag("MainCamera").GetComponent<MSCameraController>().playerObject = this.gameObject;

        ShowActor(false);
        lastTime    = 0;
        nbuffer     = new NStateBuffer(pbuffsize);
        hudObj      = GameObject.FindGameObjectWithTag("Hud");
        firstUpdate = true;
        // turn off mesh render for wireball
        MeshRenderer[] mrs = GetComponentsInChildren <MeshRenderer>();
        foreach (var mr in mrs)
        {
            if (mr.gameObject.tag == "wireball")
            {
                wireBall         = mr;
                wireBall.enabled = false;
                Debug.Log("wireball INIT " + wireBall.enabled.ToString());
                break;
            }
        }

        prevMouse      = Input.mousePosition;
        laserbeam      = GetComponentInChildren <F3DPlayerTurretController>();
        beamController = GetComponentInChildren <F3DFXController>();
        if (beamController != null)
        {
            beamController.TurretSocket[0] = this.transform;
        }
    }
    void Awake()
    {
        // Initialize singleton  
        instance = this;

        // Initialize bullet shells particles
        for (int i = 0; i < ShellParticles.Length; i++)
        {
            ShellParticles[i].enableEmission = false;
            ShellParticles[i].gameObject.SetActive(true);
        }
    }