Пример #1
0
 public void Activate()
 {
     if (status == CoinStatus.DEACTIVATED)
     {
         status = CoinStatus.TO_BE_PICKED;
     }
 }
Пример #2
0
 public void SaveCoin()
 {
     if (status == CoinStatus.PICKED_UP_NOT_SAVED)
     {
         status = CoinStatus.PICKED_UP;
     }
 }
Пример #3
0
 public CoinInfo(
     long id,
     string name,
     string symbol,
     string algo,
     string coinType,
     double withdrawFee,
     double minWithdraw,
     int confirmations,
     string baseAddress,
     bool enableDeposit,
     bool enableWithdraw,
     CoinStatus status,
     string statusMessage,
     string infoUrl,
     string iconUrl
     )
 {
     Id             = id;
     Name           = name;
     Symbol         = symbol;
     Algo           = algo;
     CoinType       = coinType;
     WithdrawFee    = withdrawFee;
     MinWithdraw    = minWithdraw;
     Confirmations  = confirmations;
     BaseAddress    = baseAddress;
     EnableDeposit  = enableDeposit;
     EnableWithdraw = enableWithdraw;
     Status         = status;
     StatusMessage  = statusMessage;
     InfoUrl        = infoUrl;
     IconUrl        = iconUrl;
 }
Пример #4
0
 public void ResetPickUp()
 {
     if (status == CoinStatus.PICKED_UP_NOT_SAVED)
     {
         GameManager.Instance().AddCoinValue(color, -1);
         status = CoinStatus.TO_BE_PICKED;
     }
 }
Пример #5
0
    protected void Start()
    {
        spriteRenderer = GetComponent <SpriteRenderer>();
        status         = CoinStatus.DEACTIVATED;

        Transform t = transform;

        while (collectSource == null)
        {
            t             = t.parent;
            collectSource = t.GetComponent <AudioSource>();
        }
    }
Пример #6
0
    protected void OnTriggerEnter2D(Collider2D col)
    {
        if (status != CoinStatus.TO_BE_PICKED)
        {
            return;
        }

        if (col.gameObject.tag == "Player")
        {
            GameManager.Instance().AddCoinValue(color, 1);
            status = CoinStatus.PICKED_UP_NOT_SAVED;
            collectSource.Play();
        }
    }
Пример #7
0
 public void SetProgress(CoinStatus status)
 {
     object[] objArray1 = new object[] { status };
     base.method_8("SetProgress", objArray1);
 }
Пример #8
0
 public void Deactivate()
 {
     status = CoinStatus.DEACTIVATED;
 }
Пример #9
0
 public void SetProgress(CoinStatus status)
 {
     base.gameObject.SetActive(true);
     this.m_currentStatus = status;
     if (status == CoinStatus.DEFEATED)
     {
         this.m_material.mainTextureOffset = this.m_grayTexture;
         this.m_cracks.SetActive(true);
         this.m_coinX.SetActive(true);
         this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
         this.m_inputEnabled = false;
         this.m_coinLabel.gameObject.SetActive(false);
     }
     else if (status == CoinStatus.ACTIVE)
     {
         this.m_cracks.SetActive(false);
         this.m_coinX.SetActive(false);
         this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
         this.m_inputEnabled = true;
     }
     else if (status == CoinStatus.UNREVEALED_TO_ACTIVE)
     {
         this.OnUpdateAlphaVal(0f);
         object[]  args      = new object[] { "y", 3f, "z", this.m_originalPosition.z - 0.2f, "time", 0.5f, "isLocal", true, "easetype", iTween.EaseType.easeOutCubic };
         Hashtable hashtable = iTween.Hash(args);
         iTween.MoveTo(base.gameObject, hashtable);
         object[]  objArray2  = new object[] { "rotation", new Vector3(0f, 0f, 0f), "time", 1f, "isLocal", true, "delay", 0.5f, "easetype", iTween.EaseType.easeOutElastic };
         Hashtable hashtable2 = iTween.Hash(objArray2);
         iTween.RotateTo(base.gameObject, hashtable2);
         object[]  objArray3  = new object[] { "y", this.m_originalPosition.y, "z", this.m_originalPosition.z, "time", 0.5f, "isLocal", true, "delay", 1.75f, "easetype", iTween.EaseType.easeOutCubic };
         Hashtable hashtable3 = iTween.Hash(objArray3);
         iTween.MoveTo(base.gameObject, hashtable3);
         object[]  objArray4  = new object[] { "from", 0, "to", 1, "time", 0.25f, "delay", 1.5f, "easetype", iTween.EaseType.easeOutCirc, "onupdate", "OnUpdateAlphaVal", "oncomplete", "EnableInput", "oncompletetarget", base.gameObject };
         Hashtable hashtable4 = iTween.Hash(objArray4);
         iTween.ValueTo(base.gameObject, hashtable4);
         SoundManager.Get().LoadAndPlay("tutorial_mission_hero_coin_rises", base.gameObject);
         base.StartCoroutine(this.ShowCoinText());
         this.m_inputEnabled = false;
     }
     else if (status == CoinStatus.ACTIVE_TO_DEFEATED)
     {
         this.m_coinX.transform.localPosition = new Vector3(0f, 10f, (UniversalInputManager.UsePhoneUI == null) ? -0.23f : 0f);
         this.m_cracks.SetActive(true);
         this.m_coinX.SetActive(true);
         this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
         this.m_inputEnabled = false;
         RenderUtils.SetAlpha(this.m_coinX, 0f);
         RenderUtils.SetAlpha(this.m_cracks, 0f);
         object[]  objArray5  = new object[] { "y", this.m_originalXPosition.y, "z", this.m_originalXPosition.z, "time", 0.25f, "isLocal", true, "easetype", iTween.EaseType.easeInCirc };
         Hashtable hashtable5 = iTween.Hash(objArray5);
         iTween.MoveTo(this.m_coinX, hashtable5);
         object[]  objArray6  = new object[] { "amount", 1, "delay", 0, "time", 0.25f, "easeType", iTween.EaseType.easeInCirc };
         Hashtable hashtable6 = iTween.Hash(objArray6);
         iTween.FadeTo(this.m_coinX, hashtable6);
         object[]  objArray7  = new object[] { "amount", 1, "delay", 0.15f, "time", 0.25f, "easeType", iTween.EaseType.easeInCirc };
         Hashtable hashtable7 = iTween.Hash(objArray7);
         iTween.FadeTo(this.m_cracks, hashtable7);
         SoundManager.Get().LoadAndPlay("tutorial_mission_x_descend", base.gameObject);
         base.StartCoroutine(this.SwitchCoinToGray());
         if (SceneMgr.Get().GetMode() == SceneMgr.Mode.GAMEPLAY)
         {
             GameState.Get().GetGameEntity().NotifyOfDefeatCoinAnimation();
         }
     }
     else
     {
         base.transform.localEulerAngles = new Vector3(0f, 0f, 180f);
         this.m_coinLabel.gameObject.SetActive(false);
         this.m_cracks.SetActive(false);
         this.m_coinX.SetActive(false);
         this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
         this.m_inputEnabled = false;
     }
 }
Пример #10
0
        private static void WriteCoinStatus(CoinStatus status)
        {
            string block1 = string.Format("pitC/{0}", status.Id);
              string block2 = status.Amount.ToString();

              _reader.WriteStringToBlock(1, block1);
              _reader.WriteStringToBlock(2, block2);
        }