예제 #1
0
 public void Init(Resource resourceType)
 {
     gameObject.SetActive(true);
     this.resourceType = resourceType;
     strength          = ResourceSettings.GetStrength(resourceType);
     this.gameObject.GetComponent <SpriteRenderer>().sprite = ResourceSettings.GetSprite(resourceType);
 }
예제 #2
0
파일: Layer.cs 프로젝트: mcrkersten/Sell-it
 public void GetDestroyed()
 {
     value = 0;
     if (onBlockDestroy != null)
     {
         foreach (ResourceBlock block in blocks)
         {
             value += ResourceSettings.GetValue(block.resourceType);
         }
         onBlockDestroy(value);
     }
     this.gameObject.transform.position = new Vector3(this.gameObject.transform.position.x, this.gameObject.transform.position.y - 4.5f, this.gameObject.transform.position.z);
     Manager.Instance.currentLayer     += 1;
     GenerateBlock();
 }
예제 #3
0
 public void Init()
 {
     instance = this;
 }