public void setAngryAI() { mHasAngry = true; GameObject obj = constant.getChildGameObject(this.gameObject, "AnimatedSprite"); tk2dSpriteAnimator ani = obj.GetComponent <tk2dSpriteAnimator>(); ani.Play("angry"); GameObject ui = constant.getChildGameObject(this.gameObject, "ui"); //iTween.ScaleTo(ui, new Vector3(3, 3, 1), 0.5f); Hashtable args = new Hashtable(); args.Add("x", 3); args.Add("y", 3); args.Add("z", 1); args.Add("time", 1.5f); args.Add("easetype", iTween.EaseType.easeInBounce); args.Add("oncomplete", "AnimationEnd"); args.Add("oncompletetarget", gameObject); iTween.ScaleTo(ui, args); //播放生气音效 soundLogic soundLogic = constant.getSoundLogic(); soundLogic.playEffect("boss1_angry"); //摄像机晃动 maplogic logic = constant.getMapLogic(); logic.shakeCamera(); }
static public soundLogic getInstance() { if (mInstance == null) { mInstance = new soundLogic(); } return(mInstance); }