// Use this for initialization
    void Start()
    {
        mGame = GameScript.instance;
//		mAnm = GetComponent<TmSpriteAnim>();
//		mDestLocalPos = transform.localPosition;
        mBulletTimer = 0.0f;
        TmSpriteAnim2D anm = GetComponent <TmSpriteAnim2D>();

        anm.SetMeshColor(new Color(0.5f, 0.5f, 0.6f, 1.0f));
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.up * mBulletSpeed * Time.deltaTime);
        mDeleteTimer -= Time.deltaTime;
        float a = mDeleteTimer / ALPHA_TIME;

        mMeshColor.a = (a < 1.0f) ? a : 1.0f;
        _anm.SetMeshColor(mMeshColor);
        if (mDeleteTimer <= 0.0f)
        {
            Destroy(gameObject);
        }
    }
    // Use this for initialization
    void Start()
    {
        if (mPosList == null)
        {
            return;
        }

        _rno = RNO.MOVE;
        mAnm = GetComponent <TmSpriteAnim2D>();
        mAnm.SetMeshColor(new Color(Random.Range(0.3f, 0.9f), Random.Range(0.3f, 0.9f), Random.Range(0.3f, 0.8f), 1.0f));
        mDistId = 0;
        Vector2 pos = mPosList[mDistId];

        pos.y += (1.0f / (float)GameScript.MESH_H) * 3.0f;
        transform.localPosition = mLocalPosOld = pos;
    }
示例#4
0
 // Use this for initialization
 void Start()
 {
     _anm       = GetComponent <TmSpriteAnim2D>();
     mMeshColor = new Color(0.7f, 0.7f, 0.5f, 1.0f);
     _anm.SetMeshColor(mMeshColor);
 }