Пример #1
0
    void Start()
    {
        Instance = this;
        SimulatedCursorPosition = transform.position;

        renderers = GetComponentsInChildren <Renderer>();
        colours   = new Color[renderers.Length];
        for (int i = 0; i < renderers.Length; ++i)
        {
            if (renderers[i].material.HasProperty("_Color"))
            {
                colours[i] = renderers[i].material.color;
            }
            else
            {
                colours[i] = renderers[i].material.GetColor("_TintColor");
            }
        }

        MoveDirection = Vector2.zero;
        AimDirection  = Vector2.zero;

        bulletPool       = GetComponent <scrBulletPool>();
        powerupShotsLeft = powerupShotsMax;

        Screen.lockCursor = true;

        // Disable. Reenabled by the master.
        enabled = false;
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        Instance   = this;
        BulletPool = GetComponent <scrBulletPool>();

        enabled = false;
    }